3v4l.org

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