3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = str_repeat('a', 1024 * 1024); // $str = str_repeat('a', 1024); $temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1); if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) { echo "Backtrack limit was exhausted!\n\n"; } echo strlen($temp);

preferences:
42.58 ms | 1497 KiB | 5 Q