3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class Obj { public $p = 'Beauty beyond comare ...'; static function showP(){ echo $this->p; } } $z[0] = "showP"; Obj::$z{[0]}();
based on fXHFI
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: Obj::$z in /in/ZpHok:12 Stack trace: #0 {main} thrown in /in/ZpHok on line 12
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Illegal offset type in /in/ZpHok on line 12 Fatal error: Function name must be a string in /in/ZpHok on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ZpHok on line 12
Process exited with code 255.