Closed ampmonteiro closed 1 year ago
Again, Smarty is not PHP. The fact that Smarty can be run with PHP 7.1 to PHP 8.2 does not mean that the Syntax of Smarty is equal to the syntax of PHP. It is not, in many respects. There are some PHP language constructs that also work in Smarty and vice versa, but the similarities are in fact very limited.
Support for named arguments was suggested in https://github.com/smarty-php/smarty/issues/864 and is still open for consideration.
In sequence of issue #888 this is not possible with smarty:
i am using php 8.0 feature called Named Arguments, in this case
hidden
name parameter and give me this error:Even that @wisskid said in #888 :
And in smarty requiremts:
however it is not fully compatible with few new features like Named Arguments which should be mention in the docs.
I still didn't try this with twig but tried with
Nette/Latte
template which works perfectly fine:you can see my full code here