Smarty with PHP 4.01pl2

From: Date: Tue, 13 Feb 2001 20:28:10 +0000
Subject: Smarty with PHP 4.01pl2
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-112@lists.php.net to get a copy of this message
I am stuck in a situation where I must use PHP 4.01pl2 because our server can not be upgraded to PHP 4.04pl1 for a couple of months. I am very interested in using Smarty right now, so I am looking for some workarounds to the problems Smarty has with earlier versions of PHP. After checking the BUGS file, it looks like preg_replace and get_defined_vars are the only major problems with using 4.01pl2. The "limit" parameter of preg_replace only appears to be used in processing {strip} tags, so I will just avoid using these tags. The function get_defined_vars only appears to be used for {include} tags when passing variables as attributes. But upon examining the code, get_defined_vars is used only for inheritance of template variables, not variables set through attributes of the {include} tag. By eliminating get_defined_vars, I made it so that {include} will still work with attributes, but the included file will not inherit any template variables. {include} tags without attributes still allow for inheritance of template variables, since they are simply converted into a PHP include. Are there any other issues that I need to deal with? Thanks, Colin Dewey

« previous php.smarty.general (#112) next »