3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '<br><br ><br/><br />'; $with_slash = strip_tags( $content, '<br />' ); $without_slash = strip_tags( $content, '<br>' ); echo "With slash:\n'$with_slash'\n\n"; echo "Without slash:\n'$without_slash'\n\n"; echo 'Correct: ' . ( '' === $with_slash ? 'Without slash' : 'With slash' );
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
With slash: '' Without slash: '<br><br ><br/><br />' Correct: Without slash

preferences:
121.22 ms | 402 KiB | 122 Q