3v4l.org

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

preferences:
46.37 ms | 402 KiB | 5 Q