3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s=<<<FOO <script>if (i<j.length);</script> hola<a href="foo">demo</a> <script> /* <![CDATA[ */ /* ]]> */ if(a>2); </script> demo bar FOO; var_dump(strip_tags( $s, '<a>' ));
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.6 - 7.3.23, 7.4.0 - 7.4.13, 8.0.0
string(18) "if (i2); demo bar"
Output for 7.3.0 - 7.3.5
string(26) "if (i */ if(a2); demo bar"