note 55163 deleted from function.call-user-func by betz

From: Date: Tue, 26 Jul 2005 21:55:20 +0000
Subject: note 55163 deleted from function.call-user-func by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92512@lists.php.net to get a copy of this message
Note Submitter: ---- This function is actually quite useful for calling static methods on classes, which you CANNOT call as: $v1 = 'MyClass'; $m1 = 'method'; $v1::$m1(); // syntax error -- not permitted. The following, however, DOES work quite well, and is hopefully slightly faster than eval() ... $ar = array($v1, $m1); call_user_func($ar); // works teh awes0me!!1! [I am, however, presuming PHP5 here ...]

« previous php.notes (#92512) next »