fork(1) download
<?php

$html = "
<p>algo</p>
<script>alguma funcao javascript</script>
<div>algo</div>
";

$html_limpo = preg_replace('/<script[^>]*>[^<]*<\/script>/', '', $html);
echo $html_limpo;
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
<p>algo</p>

<div>algo</div>