3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max_n=100010; $n=99900; $tmp_str=str_repeat('b',$n); $go=true; while (($go)&&($n<=$max_n)) { $n++; $tmp_str.='b'; $str='a'.$tmp_str.'a'; $go=preg_match('/a.*?a/sim', $str); if (!$go) { echo 'error on length '.strlen($str); die; } } echo ' ok';

preferences:
34.13 ms | 402 KiB | 5 Q