Very simple template using regex.
Very simple command. If syntax error, will tell line number.
./compile_template
PHP 7+
{$var}
{$var.a['b']["c"][$d]}
- leftpad_
any
length
- count
- len
{$var|leftpad_010} //if $var is 1, will show 0000000001
There no and
and or
.
{if $a eq $b}
$a == $b
{elif $a gt $b}
$a > $b
{elseif $a lt $b}
$a < $b
{else}
other
{/if}
- array
- empty
- defined (this will convert to isset)
- true (TRUE)
- false (FALSE)
{if $a is array}
is_array($a)
{if $a not array}
!is_array($a)
{if $a is true}
$a === true
{/if}
{for i=10 to 1 step=-1}
{$i}
{/for}
{for i=1 to 10}
{$i}
{/for}
{foreach item in $array}
{$item}
{/foreach}