Re: Fwd: Re: [PHP-PEAR] PEAR::isError()

From: Date: Mon, 04 Dec 2000 23:13:33 +0000
Subject: Re: Fwd: Re: [PHP-PEAR] PEAR::isError()
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-40056@lists.php.net to get a copy of this message
At 23:01 4/12/2000, Chuck Hagenbuch wrote:
Quoting Andi Gutmans <andi@zend.com>: Why does it make sense to send constants by reference? It doesn't, unless you mean that the boolean value true (I capitalized it in a mistaken attempt to add clarity; sorry) is a constant. If you have a method which returns true on success and an error object on failure, it would be nice to be able to pass that to PEAR::isError(). However, as things stand, we can only do that if PEAR::isError() doesn't take parameters by reference, which means that we get a performance hit every time it _is_ called with an object.
true/false behave like constants, pretty much. I wouldn't change scripts to pass things by reference just because it's faster, if it's not the right thing to do, and apparently, it's not the case here... Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#40056) next »