3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* it('should account for ending type in allowable tags when specified as a string', function() { + var html = '<article>lorem ipsum<br> dolor<br /> sit</article>', + allowedTags = '<br>', + text = 'lorem ipsum<br> dolor sit'; + + assert.equal(striptags(html, allowedTags), text); + }); */ $html = '<article>lorem ipsum<br> dolor<br /> sit</article>'; $allowedTags = '<br>'; $text = 'lorem ipsum<br> dolor sit'; echo strip_tags(html, allowedTags) === text ? 'equal' : 'not equal';

preferences:
45.89 ms | 402 KiB | 5 Q