3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { function Test() { $spec['validator'] = 'fn'; echo self::$spec['validator']($bank); } function fn() { return 'def'; } } $c = new C; $c->Test();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: C::$spec in /in/OFrqg:5 Stack trace: #0 /in/OFrqg(10): C->Test() #1 {main} thrown in /in/OFrqg on line 5
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Notice: Undefined variable: bank in /in/OFrqg on line 5 def