note 107574 added to language.functions

From: Date: Sat, 18 Feb 2012 15:37:14 +0000
Subject: note 107574 added to language.functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-186213@lists.php.net to get a copy of this message
Updating my post below, this is a more elegant solution (instead of using "eval", use "call_user_func" for the intended result): <?php 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 call_user_func($strFN2); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 72.219.151.91 ---- Manual Page -- http://www.php.net/manual/en/language.functions.php Edit -- https://master.php.net/note/edit/107574 Del: integrated -- https://master.php.net/note/delete/107574/integrated Del: useless -- https://master.php.net/note/delete/107574/useless Del: bad code -- https://master.php.net/note/delete/107574/bad+code Del: spam -- https://master.php.net/note/delete/107574/spam Del: non-english -- https://master.php.net/note/delete/107574/non-english Del: in docs -- https://master.php.net/note/delete/107574/in+docs Del: other reasons-- https://master.php.net/note/delete/107574 Reject -- https://master.php.net/note/reject/107574 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186213) next »