4 * This variable parser uses PHP's internal code engine. Because it does
5 * this, it can represent all inputs; however, it is dangerous and cannot
8 class HTMLPurifier_VarParser_Native
extends HTMLPurifier_VarParser
14 * @param bool $allow_null
17 protected function parseImplementation($var, $type, $allow_null)
19 return $this->evalExpression($var);
25 * @throws HTMLPurifier_VarParserException
27 protected function evalExpression($expr)
30 $result = eval("\$var = $expr;");
31 if ($result === false) {
32 throw new HTMLPurifier_VarParserException("Fatal error in evaluated code");