3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo nl2br("Hello \nmy\rfriend\n\r", true);
based on D2vWs
Output for 5.3.0 - 7.1.0
Hello <br /> my<br /> friend<br />
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for nl2br() in /in/pStkh on line 2