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)); //$variable = str_replace(' ','',$variable); echo $variable; } make_safe("<p>Test-A bsatz. </p>"); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Test-A bsatz.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.51 ms | 401 KiB | 8 Q