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 what versions of PHP this works on. This could mean it works on ALL versions of PHP, but I doubt it. Specifically, does this work on PHP4?

有帮助吗?

解决方案

For php 4.3 they are working. Build-in function test here, your source test here.

其他提示

Definitely Yes. As you can see in here when there is a dependency in a certain function they set it below the title.

No dependcy in version of php

VARIABLE Functions

With dependency in version of php

INTVAL Function

note: so whenever you have concerns on a certain function that you will use regards on your php version better consult php.net for info.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top