3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private static $VAR = [17,289,4913]; public function foo() { return function () { var_dump($this::$VAR); }; } } (new A)->foo()();
based on TJUoZ
Output for 7.0.0 - 7.3.0beta1
array(3) { [0]=> int(17) [1]=> int(289) [2]=> int(4913) }
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected '(' in /in/dD5gq:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected '(' in /in/dD5gq:12 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/dD5gq on line 12
Process exited with code 255.