3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var) { echo "Testing: $var\n"; } class foo { var $arr = array("test"); function bar($str) { if ( is_callable( $this->arr[0] ) ){ echo $this->arr[0]($str); } } } $foo = new foo; $foo->bar("bla"); // Testing bla

preferences:
26.03 ms | 402 KiB | 5 Q