Alternatives for {php} In Templates

Use of the {php} in Smarty templates is removed and should not be used, as going forward starting in Smarty 3.1 they will no longer work. Starting in version 6.0.0 which uses Smarty 3.1.5, you will no longer be able to use {php} Smarty tags and must use an alternate resource instead. More info can be read in the Smarty 3.1 Release Notes. Here is a snippet from that specifically affecting the {php} (and related) functions:

There is absolutely no PHP allowed in templates any more. All
deprecated features of Smarty 2.0 are gone. Again, use the SmartyBC
class if you need any backward compatibility.

You can also read more info about it on the smarty.net documentation page for {php}. Below are alternatives to using {php} in your templates specific for this software.