note 81389 deleted from language.functions by googleguy

From: Date: Tue, 22 Oct 2013 12:17:58 +0000
Subject: note 81389 deleted from language.functions by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197156@lists.php.net to get a copy of this message
Note Submitter: Jakob Thomsen ---- Note that if you have the name of function in a variable, then you can call it, if that function is globally available. It cannot be the name of a function in a class. An example: class foo { public static function bar(){ return "bar in a class called"; } } function bar() { return "normal bar called"; } $strFN = "bar"; echo $strFN(); $strFN2 = "foo::bar"; echo $strFN2(); This will result in normal bar called Fatal error: Call to undefined function foo::bar() in /path/to/test.php on line 16

« previous php.notes (#197156) next »