ZEND_SEND_PREFER_REF does pass by reference if it is possible and pass by
value in other case (constants, temporary results).
So it is does the same as "pass by const".

Thanks. Dmitry.

> -----Original Message-----
> From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 15, 2005 8:17 PM
> To: Dmitry Stogov
> Cc: php-cvs@lists.php.net; 'Andi Gutmans'; 'Zeev Suraski'
> Subject: Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c
> 
> 
> Dmitry,
> 
> While passing by ref in this case would be a bit faster, but 
> those two functions really should not be taking arguments by 
> reference. What we really need is "pass by const".
> 
> Ilia
> 
> Dmitry Stogov wrote:
> > Hi Ilia,
> > 
> > In php 5.1 and above we can use ZEND_SEND_PREFER_REF flag 
> instead of 
> > ZEND_SEND_BY_REF. I think we should do it.
> > 
> > Thanks. Dmitry.
> > 
> > 
> >>-----Original Message-----
> >>From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, September 14, 2005 6:11 PM
> >>To: Dmitry Stogov
> >>Cc: 'Ilia Alshanetsky'; php-cvs@lists.php.net; Andi Gutmans; 
> >>Zeev Suraski
> >>Subject: Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c
> >>
> >>
> >>Dmitry Stogov wrote:
> >>
> >>>Are you sure?
> >>>Passing by value may copy whole array.
> >>
> >>It makes the functions a TINY bit slower 0.06 seconds for
> >>1000000 itterations, but makes it possible to pass return 
> >>values of functions that return arrays.
> >>
> >>Ilia
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> 
> 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to