3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var) { echo "in function ",__FUNCTION__,"\n"; echo "Test: \$var == $var\n"; } class foo { public $arr = array("test"); function bar() { $this->arr[0]('some value'); } } $a = new foo(); $a->bar(); foo::hello(); var_dump(method_exists($a,'test'));

preferences:
47.44 ms | 402 KiB | 5 Q