mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
42 lines
477 B
Plaintext
42 lines
477 B
Plaintext
|
--TEST--
|
||
|
get_class_vars(): Testing with static properties
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class A {
|
||
|
static public $a, $aa;
|
||
|
static private $b, $bb;
|
||
|
static protected $c, $cc;
|
||
|
|
||
|
static public function test() {
|
||
|
var_dump(get_class_vars(__CLASS__));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var_dump(get_class_vars('A'));
|
||
|
var_dump(A::test());
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
array(2) {
|
||
|
["a"]=>
|
||
|
NULL
|
||
|
["aa"]=>
|
||
|
NULL
|
||
|
}
|
||
|
array(6) {
|
||
|
["a"]=>
|
||
|
NULL
|
||
|
["aa"]=>
|
||
|
NULL
|
||
|
["b"]=>
|
||
|
NULL
|
||
|
["bb"]=>
|
||
|
NULL
|
||
|
["c"]=>
|
||
|
NULL
|
||
|
["cc"]=>
|
||
|
NULL
|
||
|
}
|
||
|
NULL
|