Jump to content

Call to undefined function -- PHP variable functions

Jim Bailie

Recommended Posts

This example from https://www.php.net/manual/en/functions.variable-functions.php does not work in PW or any script bootstrapping the same (namespacing?).

function foo() {
    echo "In foo()<br />\n";

$func = 'foo';
$func();  // This calls foo()

I'm sure there is an explanation for this, but I haven't been able to discover that as of yet.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...