3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<EOT if (1 == 1) { echo 'test'; } while (blah = blah) { echo 'blah'; } EOT; $text = preg_replace('/\) *\n(?=\n{)/', ")", $text); echo $text;

preferences:
47.11 ms | 404 KiB | 5 Q