3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // could be done in one line $str = "a\r\nstring\n"; $str = str_replace(array("\r\n", "\n"), "\n", $str); // PHP_EOL echo $str; ?>
Output for 4.3.0 - 7.1.0
a string