Generate debug template to show error when rendering. With this flag, the performance of rendering may be slowed.
Compile template to debug version, output HTML error hint for browser when variable not found.
Used option: FLAG_RENDER_DEBUG
NULL
OK!
OK!<!--MISSED((--><!--))-->
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "OK!{{foo}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_RENDER_DEBUG
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data, array(
"debug" => \LightnCandy\Runtime::DEBUG_TAGS_HTML
));
Compile template to debug version, output ANSI error hint for terminal when variable not found.
Used option: FLAG_RENDER_DEBUG
NULL
OK!
OK![0;31m
[0m
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "OK!{{foo}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_RENDER_DEBUG
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data, array(
"debug" => \LightnCandy\Runtime::DEBUG_TAGS_ANSI
));
Compile template to debug version, output to PHP error log when variable not found.
Used option: FLAG_RENDER_DEBUG
NULL
OK!
OK!
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "OK!{{foo}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_RENDER_DEBUG
));
$render = LightnCandy::prepare($php);
$data = NULL;
echo $render($data, array(
"debug" => \LightnCandy\Runtime::DEBUG_ERROR_LOG
));