3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count= 1024; $in= ""; $script= $out= "function something (a,b,c) { do(this); do(that); alert('guruguru'); } "; while (strlen($out)!=0 && strlen($out)!=strlen($in)) { echo "count: ".$count."\n"; $in= "<html>\n<head>\n<script type=whatever>".str_repeat($script, $count)."</script>\n</head>\n</html>"; printf("%7d bytes original.\n", strlen($in)); $out= preg_replace('!<script\b[^>]*>.*</script>!sU', '', $in); printf("%7d bytes after script-removal.\n\n", strlen($out)); $count*= 2; }

preferences:
182.7 ms | 406 KiB | 5 Q