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
11 protected function parseImplementation($var, $type, $allow_null) {
12 return $this->evalExpression($var);
15 protected function evalExpression($expr) {
17 $result = eval("\$var = $expr;");
18 if ($result === false) {
19 throw new HTMLPurifier_VarParserException("Fatal error in evaluated code");