I know you can do something like this in PHP5:
function sayHi() {
echo "Hi!";
}
$func = "sayHi";
$func();
It is called a variable function in the documentation. But the docs don't say anything about which versions of PHP this works on. This may mean that it works in all versions of PHP, but I doubt it. In particular, does it work in PHP4?
source
share