function ($x) use($arg) { return ""; }, $endfor => function ($x) { return ""; }, $if => function ($x) use ($arg) { return ""; }, $endif => function ($x) { return ""; }, "/{{\s*$var\s*}}/" => function ($x) use ($arg) { return ""; }, ]; $result = file_get_contents($html); foreach($pattern as $key => $value) { $result = preg_replace_callback($key, $value, $result); } $this->code = $result; } function render($vars) { extract($vars); ob_start(); eval(" ?>".$this->code."