note 116648 deleted from reflectionclass.getmethods by cmb

From: Date: Thu, 29 Sep 2016 10:26:49 +0000
Subject: note 116648 deleted from reflectionclass.getmethods by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-206703@lists.php.net to get a copy of this message
Note Submitter: Vladimir Kovpak ---- <?php /** * Array of all class methods. */ class foo { public function __construct() { } private function bar() { } protected function boo() { } } $reflection = new ReflectionClass('foo'); $methods = $reflection->getMethods(); array_walk( $methods, function (&$v) { $v = $v->getName(); } ); var_export($methods); ?> Result: array ( 0 => '__construct', 1 => 'bar', 2 => 'boo', )

« previous php.notes (#206703) next »