Re: [SMARTY] Re: object calls fail after upgrade to 2.6.4

From: Date: Thu, 09 Sep 2004 17:10:53 +0000
Subject: Re: [SMARTY] Re: object calls fail after upgrade to 2.6.4
References: 1 2 3 4  Groups: php.smarty.dev php.smarty.general 
Request: Send a blank email to php-smarty-dev+get-2552@lists.php.net to get a copy of this message
Hi Monte, On Thu, 9 Sep 2004, Monte Ohrt wrote: > The reason objects as parameters to objects was not allowed is because > PCRE does not support infinite recursion, and this would certainly not > be practical to parse: > > {$foo->bar($foo->bar($foo->bar(...)))} Oh yes, I see. If only PHP had a Parse::RecDescent as Perl has :-) > However, since there is code relying on these little discrepancies, I > have just committed to CVS the ability to do one level of object > nesting. So, this is valid syntax: > > {$foo->bar($foo->bar))} > {$foo->bar($foo->bar()))} > {$foo->bar($foo->bar($foo)))} > {$foo->bar($foo->bar($foo,$bar.blah,0))} > > However this is NOT permitted: > > {$foo->bar($foo->bar($foo->bar)))} This is very good news! One level should be sufficient. > Please test and let me know if there are problems. It looks pretty good now. I could only find one case that is still causing a parser error: {$obj->meth("foo", $obj->val)} To make your life easier, I have extended the testcase that I sent earlier today. It includes the above failing case. Maybe it could be integrated in the unit test suite. A last word: thank you very much for your quick help on this matter. It is very much appreciated. Hans

« previous php.smarty.dev (#2552) next »