{{ date("Y") }} does not seem to work
Closed this issue · 3 comments
wouterds commented
Hi,
As far as I know you can execute native PHP functions with Blitz, right?
But for some reason {{ date("Y") }}
just prints "Y". Known bug? What are the alternatives?
Cheers,
Wouter
alexeyrybak commented
please use php::date('Y')
$T = new Blitz();
$T->load('{{ php::date("Y"); }}');
$T->display();
I will keep this issue open as I think it's because of old legacy built-in blitz functions that should be better removed now (date, escape, maybe something else).
wouterds commented
Thanks!
Deleted user commented
It also may be viable to make plain {{ xxx() }} callbacks to use just source Blitz object methods and not call PHP functions as a fallback, enforcing {{ php::xxx() }} syntax for PHP functions to make calls more clean/predictable.