Class Example:
class Example{ public static $ONE = [1,'one']; public static $TWO = [2,'two']; public static $THREE = [3,'three']; public static function test(){ // manually created array $arr = [ self::$ONE, self::$TWO, self::$THREE ]; } }
Is there a way in PHP to get an array of static member variables of a class without manually creating it, as in the example?
php
James may
source share