Closed Ninjinka closed 4 months ago
@Ninjinka can you post an example test case of how you're calling this?
// https://github.com/smarty-php/smarty/issues/561
function smarty_modifier_join($array, $glue = '') {
return join($glue, $array);
}
That is my join
modifier which works without warnings.
Is not best to be php compilant?
Smarty is Smarty and PHP is PHP. Smarty has no intention to mimic the syntax of PHP.
In my opinion, using implode as follows looks rather funny:
{","|implode:$array} {* <- this is weird *}
And this is much better:
{$array|join:","}
Hello as php.net state implode (or join since it's an alias) should be
implode([string] $separator, [array] $array): [string]
Why smarty send a deprecation notice if used correctly? also the deprecation suggest to use join and with as parameters first array than separator (as in legacy mode for php 7.4)
Is not best to be php compilant?