3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = str_repeat('a', 1e4); $start = microtime(true); $pos = 0; while(preg_match('/\G\w/', $str, $m, 0, $pos)) ++$pos; $end = microtime(true); echo 'NO u flag: ', number_format(($end - $start)*1000, 6), 'ms', PHP_EOL; $str = str_repeat('e', 1e4); $start = microtime(true); $pos = 0; while(preg_match('/\G\w/u', $str, $m, 0, $pos)) ++$pos; $end = microtime(true); echo 'WITH u flag: ', number_format(($end - $start)*1000, 6), 'ms', PHP_EOL;

preferences:
32.59 ms | 402 KiB | 5 Q