3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>'; echo strip_tags($text); echo "\n"; // Allow <p> and <a> echo strip_tags($text, '<p><a>');
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.2.0
Test paragraph. Other text <p>Test paragraph.</p> <a href="#fragment">Other text</a>