Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5447 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2873 invoked by uid 1010); 13 Nov 2003 19:11:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 2819 invoked from network); 13 Nov 2003 19:11:10 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 13 Nov 2003 19:11:10 -0000 Received: from [10.21.1.187] (c38047.upc-c.chello.nl [212.187.38.47]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id hADJB7UV007219; Thu, 13 Nov 2003 20:11:08 +0100 Date: Thu, 13 Nov 2003 20:11:07 +0100 (CET) X-X-Sender: derick@localhost.localdomain To: Michael Walter cc: internals@lists.php.net In-Reply-To: <3FB3CFD5.70507@leetspeak.org> Message-ID: References: <1068703990.3fb320f6975fb@www.3gstech.com> <3FB3CFD5.70507@leetspeak.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Warning: helo-invalid Subject: Re: [PHP-DEV] php5 method return reference error? From: derick@php.net (Derick Rethans) On Thu, 13 Nov 2003, Michael Walter wrote: > Not sure I'm missing something, but I fail to see the problem: Doesn't > PHP 5 use object references anyway? So function pla() { return new > Foo(); } would return a reference anyway, instead of copying the object > itself over? No, it's not a reference, but an object handle which still can be passed as reference (but it's quite unuseful to do). > So just removing & should fix the problem, as long as you're dealing > with objects. Yup. Derick