3v4l.org

run code in 300+ PHP versions simultaneously
<?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

preferences:
52.12 ms | 402 KiB | 5 Q