3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = ' fghssd gg '; if (preg_match('/([a-z])\1{2,}/', $txt)) echo 'The string is not valid';

preferences:
36.83 ms | 402 KiB | 5 Q