3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // text includes line breaks $text_with_line_breaks = "1st\n2nd\3rd\n"; highlight_string ( $text_with_line_breaks, FALSE); // $body is a single line, without line breaks //echo $body ?>
Output for 5.0.0 - 7.1.0
<code><span style="color: #000000"> 1st<br />2ndrd<br /></span> </code>
Output for 4.3.0 - 4.4.9
<code><font color="#000000"> 1st<br />2ndrd<br /></font> </code>