3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Class Obj { public $p = 'Beauty beyond comare ...'; static function showP(){ echo $self->p; } } $z[0] = "showP"; Obj::$z[0]();
based on 3ekIE
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: Obj::$z in /in/viO0A:12 Stack trace: #0 {main} thrown in /in/viO0A on line 12
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: self in /in/viO0A on line 7 Notice: Trying to get property of non-object in /in/viO0A on line 7