Re: Fwd: Re: [PHP-PEAR] PEAR::isError()
| From: | Zeev Suraski | Date: | Tue, 05 Dec 2000 09:35:34 +0000 |
| Subject: | Re: Fwd: Re: [PHP-PEAR] PEAR::isError() | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40092@lists.php.net to get a copy of this message | ||
At 11:08 5/12/2000, Ulf Wendel wrote:
I must confess that I did not meter the lastest 4.0.4dev version but a version before (4.0.1dev or so) and I can't say that reference are faster. The opposite is true in my eyes. In PHPDoc there are many, many situations where I thought of passing by reference or using references. But I did not - not only to be PHP 3 compatible. Pass by value seems to be faster. At least with huge arrays as they get used in PHPDoc (tree structures need references...).As a separate letter (after totally agreeing you shouldn't pass by reference for performance reasons) - that's not what Andi said. Andi talked only about passing *objects*. In case of any other data type (arrays included), passing by value is faster. Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/