compile to echo 'a', $b, 'c';
to improve performance. This will slow down rendering when the template and data are simple, but will improve 5% ~ 10% when the data is big and looping in the template.
compile to 'a' . $b . 'c'
when do not use FLAG_ECHO
Used option: FLAG_JSTRUE
NULL
A
C
Command failed: php .exec_tmp_file 2>/dev/null
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "A{{{foo}}}C";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_JSTRUE
));
echo $php
compile to echo 'a', $b, 'c'
by default
Used option: FLAG_ECHO
NULL
A
C
Command failed: php .exec_tmp_file 2>/dev/null
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "A{{{foo}}}C";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_ECHO
));
echo $php