3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private static function callback() { return "Test"; } public function doSomething() { return preg_replace_callback('/./', 'Example::callback', 'foo'); } } $e = new Example; echo $e->doSomething();

preferences:
61.55 ms | 402 KiB | 5 Q