- preg_replace: documentation ( source)
<?php
$content = '❷span class=❹hl-variable❹❸$foo❷/span❸ = ❷span style=❹display: none❹❸{_❷/span❸❷span class=❹hl-em❹❸"❷span class=❹hl-value❹❸SELECT * FR❷span class=❹hl-property❹❸SELECT❷/span❸rs�❷span class=❹hl-property❹❸FROM❷/span❸pan❸"❷/span❸❷span style=❹display: none❹❸_}❷/span❸;';
$content = preg_replace('/\R/u', PHP_EOL, $content);
echo $content;