3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static public $arr = array("test"); function bar( $str ){ var_dump(self::$arr[0]); (self::$arr[0])( $str ); } static function test($var) { echo "Testing: $var\n"; } } (new Foo)->bar("bla");

preferences:
46.66 ms | 402 KiB | 5 Q