- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.13
- New line with single quotes: \n New line with double quotes: <br />
<?php
echo 'New line with single quotes: ' . nl2br('\n') . PHP_EOL;
echo 'New line with double quotes: ' . nl2br("\n") . PHP_EOL;