Re: Sv: Re: [SMARTY] assign_by_ref() and append_by_ref()

From: Date: Sat, 03 Aug 2002 16:38:13 +0000
Subject: Re: Sv: Re: [SMARTY] assign_by_ref() and append_by_ref()
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5578@lists.php.net to get a copy of this message
On 3 Aug 2002 at 10:48, Monte Ohrt wrote: > They do not recommend pass-by-reference at call time, it will probably > be deprecated. > > So don't do this: > > my_func(&$var); > function my_func($var) { > } > > instead do this: > > my_func($var); > function my_func(&$var) { > } I don't understand the reason for not allowing this. So if you want to implement a stack class with push(), pop(), peek(), shift(), unshift(), etc., do you have to define each function twice if you want to enable but not force references??? I asked it in the Zend Engine2 mailing list (engine2@lists.zend.com), but I did not receive any answer yet. Do you now the answer? -- Ferdinand Beyer <fbeyer@clickhand.de>

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