Does PHP4 work in PHP4?

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?

+4
source share
2 answers

For php 4.3 they work. The built-in functional test is here , your original test is here .

+1
source

Definitely yes. As you can see here, when there is a dependency in a particular function, they install it under the heading.

php

VARIABLE

php

INTVAL

note: , , php, php.net .

+1

All Articles