3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = str_repeat('a', 5431); $res = preg_match('~(a)*~', $subject); if ($res > 0) { echo 'match', PHP_EOL; } elseif ($res === 0) { echo 'no match', PHP_EOL; } else { echo 'preg_match error ', preg_last_error(), PHP_EOL; }

preferences:
23.74 ms | 406 KiB | 5 Q