3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test() { echo "Testing..."; } class foo { var $arr = array("test"); function bar() { $this->arr[0](); } } $foo = new foo; $foo->bar(); function bye(){ echo "bye!"; } class A { static function hello() { echo "Hello World\n"; } } $y[0] = 'hello'; $y[1] = 'bye'; A::$y[0](); $a = new A(); $a->$y[1](); ?>
based on Bo0pQ
Output for 7.0.0 - 7.2.0
Testing... Fatal error: Uncaught Error: Access to undeclared static property: A::$y in /in/mWr2s:29 Stack trace: #0 {main} thrown in /in/mWr2s on line 29
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Testing...Hello World Fatal error: Call to undefined method A::bye() in /in/mWr2s on line 31
Process exited with code 255.