3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $string = "This is \r\n a \r\n test"; echo PHP_EOL; echo preg_replace('/\s+/', ' ', $string);

preferences:
33.23 ms | 404 KiB | 5 Q