Generate stand-alone PHP codes which can be execute without LightnCandy\Runtime class. The compiled PHP code will contain scoped Runtime functions and the file size will be bigger. And, the performance will faster 5 ~10%.
Default, require LightnCandy\Runtime.
Used option: FLAG_JSTRUE
NULL
Command failed: php .exec_tmp_file 2>/dev/null
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{{foo}}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_JSTRUE
));
echo $php
Stand alone, include used LightnCandy\Runtime functions.
Used option: FLAG_STANDALONEPHP FLAG_JSTRUE
NULL
Command failed: php .exec_tmp_file 2>/dev/null
require('./vendor/autoload.php');
use LightnCandy\LightnCandy;
$template = "{{{foo}}}";
$php = LightnCandy::compile($template, array(
"flags" => LightnCandy::FLAG_STANDALONEPHP | LightnCandy::FLAG_JSTRUE
));
echo $php