3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<!doctype html> <html> <head> <meta charset="utf-8"> <title> hey </title> <script type="text/javascript"> var fasdfsd="fasdfsd"; </script> <script type="text/javascript" src="http://google.adv.js"></script> <script> alert("hello"); </script> <script type="text/javascript">alert(fasdfsd)</script> <script type="text/javascript" src="lfasd.js"></script> </head> <body> hey </body> </html>'; $str = preg_replace("@<script[^>]*?>.*?</script>@siu","",$str); echo html_entity_decode($str);

preferences:
37.62 ms | 402 KiB | 5 Q