function strip_php ($variable) { $variable = preg_replace_callback('/<[\?%].*[\?%]>/iU', create_function('$x', 'return htmlentities($x[0]);') , $variable); return $variable; }