$html = 'this <br>is<br/>some<br />text <br />!';
$nl = preg_replace('#<brs*/?>#i', "
", $html);
echo $nl;
$newlineTags = array(
'<br>',
'<br/>',
'<br />',
);
$html = str_replace($newlineTags, PHP_EOL, $html);
$newlineTags = array(
'<br>',
'<br/>',
'<br />',
);
$str = str_ireplace($newlineTags, PHP_EOL, $str);