<?php echo $sanitizer->useHtmlSpecialChars("<script>alert('This is js code');</script>");
info at phpclasses dot org