world! My Name is {$data.value}... Yeah'; $tpl[1] = 'Hello world! My Name is {$data.value[label].dot|json_decode|lower|truncate:80:"...":true:null:0.22:$a.keyz|upper}... Yeah'; $tpl[2] = 'Hello world, {$user.name|upper}! My Name is {$data.user1.5.$i."return"[ $hello.world|lower ]|upper}... Yeah'; $tpl[3] = 'Hello world! My Name is {$data->set->get|upper}... Yeah'; $tpl[4] = 'Hello world! My Name is {$iam->getName()|upper}... Your Name is {$you->getFromat(1, 0.4, "%dth", \'grade\', $global->name.k|lower)|upper}? Yeah'; $tpl[5] = 'Hello world! {if isset($data.user) && !empty($data->value)} My Name is {$data->user|upper}... {/if} Yeah'; $tpl[6] = 'Hello world! {if $data.user >= 5 && $k++ || foo($data->value) && !bar($d) + 3 || $show.go?} My Name is {$data->user|upper}... {/if} Yeah'; $tpl[7] = 'Hello world! {foreach from=$users."list" key=k item=e} My Name is {$e|upper} ({$k})... {/foreach} Yeah'; $tpl[8] = 'Hello world! {switch $data->enum} {case "dotted"} dotted lines
{break} {case 7} numeric lines
{break} {case $list|truncate} lister
{break} {/switch} Yeah'; $tpl[9] = 'Hello world! {if $data->enum?} dotted lines
{elseif $list|truncate} lister
{/if} Yeah'; $tpl[10] = 'Check system variable
Current timestamp {$aspect.now}...
$_GET {$aspect.get.item}...
$_POST {$aspect.post.myval|upper}...
$_COOKIES {$aspect.cookies["uid"]}...
$_REQUEST {$aspect.request?}...
Consts {$number|round:$aspect.const.PHP_INT_MAX|}...
Ok'; $tpl[11] = 'Hello world! {for from=1 to=$e|count}
Go
{/for} Yeah'; $tpl_ = ' Hello world! My Name is {$data|upper}... {* comment *} I have '; $template = new MF\Aspect\Template($tpl[7], 'my.tpl'); //var_dump(Tokenizer::decode('case 6:')); //exit; echo "\n".$template->getBody()."\n"; //var_dump($template->fetch(array("data" => array("value" => "Yohoho")))); ?>