I stumbled across this code today
class FILTER extends self
{
protected static function sanitizeHtml($html)
{
static $parser;
if (!isset($parser)) $parser = new HTMLPurifier;
return $parser->purify($html);
}
}
What does this class gain from extendingself
? Im not quite sure if this ruby example is equivalent or even applicable to PHP.