note 20920 added to function.get-class-methods

From: Date: Mon, 22 Apr 2002 02:18:21 +0000
Subject: note 20920 added to function.get-class-methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-29666@lists.php.net to get a copy of this message
If you use "get_class_methods" to check if a Method is in a Class remember that the function return lowered name of class methods: class classPippo { function DummyFunct() { // Do nothing... } } $aClassMethods = get_class_methods(classPippo); $sMethodName = 'DummyFunct'; // This not work... if (in_array($sMethodName, $aClassMethods)) classPippo::DummyFunct(); // This work... if (in_array(strtolower($sMethodName), $aClassMethods)) classPippo::DummyFunct(); -- http://www.php.net/manual/en/function.get-class-methods.php http://master.php.net/manage/user-notes.php?action=edit+20920 http://master.php.net/manage/user-notes.php?action=delete+20920 http://master.php.net/manage/user-notes.php?action=reject+20920

« previous php.notes (#29666) next »