3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class P{ public $foo; } class C extends P { public $lol; public function getFields() { return array_keys(get_class_vars(static)); } } $c = new C(); var_dump($c->getFields());
Output for 5.4.16
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/IlhTW on line 12
Process exited with code 255.
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in HZMEM on line 12
Process exited with code 255.
Output for 5.3.25 - 5.3.26
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in /in/IlhTW on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in HZMEM on line 12
Process exited with code 255.