3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($var) { echo "Testing: $var\n"; } class foo { var $arr = array("test"); var $v = "test"; function bar($str) { $this->arr[0]($str); $this->v($str); } } $foo = new foo; $foo->bar("bla");
based on G7kIu
Output for 7.0.0 - 7.2.0
Testing: bla Fatal error: Uncaught Error: Call to undefined method foo::v() in /in/84gv2:15 Stack trace: #0 /in/84gv2(21): foo->bar('bla') #1 {main} thrown in /in/84gv2 on line 15
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Testing: bla Fatal error: Call to undefined method foo::v() in /in/84gv2 on line 15
Process exited with code 255.