3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_replace_callback('/a/', function($m) { for($i = 0; $i < 10000; $i++) preg_replace('/foo'.$i.'bar/', 'baz', '???foo'.$i.'bar???'); return 'b'; }, 'aa');

preferences:
43.99 ms | 459 KiB | 5 Q