Re: Re: Problem with passing function return values by reference

From: Date: Fri, 17 Nov 2000 18:40:05 +0000
Subject: Re: Re: Problem with passing function return values by reference
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-38449@lists.php.net to get a copy of this message
At 06:34 PM 11/17/00 +0200, Stanislav Malyshev wrote: > Actually, AFAIK, it's exactly the reverse - it would always bring > unnecessary copied when passing by reference. The reason is simple, let's > do: Quoting Andi Gutmans <andi@zend.com>: > As a general rule: > With objects it's faster to pass by reference. > With other data-types it's faster to pass by value. Okay... I'm a little confused. Andi, would you take a look at PEAR::isError() in php4/pear/PEAR.php(.in), and can you say whether or not it should take a reference? IE, is the inconvenience of not being able to directly pass it a function result that might be a boolean justified by the performance gain, if there _is_ a performance gain? -chuck -- Charles Hagenbuch, <chuck@horde.org> "If you can't stand the heat, get out of the chicken!" - Baby Blues

« previous php.dev (#38449) next »