3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strip_html_tags( $text ) { $text = preg_replace( array( // Remove invisible content '@<head[^>]*?>.*?</head>@siu', '@<style[^>]*?>.*?</style>@siu', '@<script[^>]*?.*?</script>@siu', '@<object[^>]*?.*?</object>@siu', '@<embed[^>]*?.*?</embed>@siu', '@<applet[^>]*?.*?</applet>@siu', '@<noframes[^>]*?.*?</noframes>@siu', '@<noscript[^>]*?.*?</noscript>@siu', '@<noembed[^>]*?.*?</noembed>@siu' ), array( '', '', '', '', '', '', '', '', ''), $text ); return strip_tags( $text); } function make_safe($variable) { $variable = strip_html_tags($variable); $bad = array("=","<", ">", "/","\"","`","~","'","$","%","#"); $variable = str_replace($bad, "", $variable); $variable = (trim($variable)); echo $variable; } make_safe("<p style="color: red;">Test-Absatz. </p>"); ?>
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'color' (T_STRING) in /in/nWEOi on line 32
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/nWEOi on line 32
Process exited with code 255.

preferences:
180.56 ms | 1395 KiB | 66 Q