3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "Anil kumar\r\nAhmedabad\r\nAhmedabad,Goa - 380015, India"; $order = array("\r\n", "\n", "\r"); $order1 = array("<br />", "<br />", "<br />"); echo str_replace($order, $order1, $str)."<br />";
based on 0Qj6t
Output for 4.3.0 - 7.1.0
Anil kumar<br />Ahmedabad<br />Ahmedabad,Goa - 380015, India<br />