Why is there a function create_function() if I could just create the function something() { ... }. What is create_function(string $args, string $code); really meant for?
For example should I want to echo a specific value, written long hand:
function sayHi($name){
echo 'Hi,' . $name;
}
//using it like:
sayHi('Jacques Marais');
But then using the create_function() method:
$sayHi = create_function('$name', 'echo \'Hi,\' . $name;');
//using it like:
$sayHi('Jacques Marais');