3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = (object) array( 'myFunction' => function($test) { return $test; }, ); var_dump($object->myFunction('Foo'));

preferences:
29.49 ms | 402 KiB | 5 Q