Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13209 invoked by uid 1010); 19 Jul 2006 19:43:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13193 invoked from network); 19 Jul 2006 19:43:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2006 19:43:00 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 66.249.92.175 ug-out-1314.google.com Linux 2.4/2.6 Received: from ([66.249.92.175:42021] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 24/A1-29121-24B8EB44 for ; Wed, 19 Jul 2006 15:43:00 -0400 Received: by ug-out-1314.google.com with SMTP id k3so532517ugf for ; Wed, 19 Jul 2006 12:42:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=W8+vBkb6WFJ6mFM30tzZQwowucEXk5vQ79C8XjpMvuZJ2OjU5E57tUUlF/pPaSum9E6VCOgj03bQ/WpxsmSj5qx8AADZeujnURSVPd4RYeWQbBzv8O3fQNoyKGcQC78udKs/zwK0Eln6c4kR1eKkWm+LYLevpxPn1VM/TwiH0Dg= Received: by 10.66.219.11 with SMTP id r11mr1093421ugg; Wed, 19 Jul 2006 12:42:55 -0700 (PDT) Received: by 10.66.220.11 with HTTP; Wed, 19 Jul 2006 12:42:54 -0700 (PDT) Message-ID: Date: Wed, 19 Jul 2006 21:42:54 +0200 To: "Marcus Boerger" Cc: internals@lists.php.net, "Christian Stocker" In-Reply-To: <382048148.20060719213942@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44BE2AE5.4090700@bitflux.ch> <10845a340607190624w44b6d7b1ycff7610d03cc3676@mail.gmail.com> <44BE347A.5060106@bitflux.ch> <20060719155615.35eff909@pierre-u64> <382048148.20060719213942@marcus-boerger.de> Subject: Re: [PHP-DEV] PHP 5.2-dev "Cannot use array returned from foo::__get('bar') in write context" From: pierre.php@gmail.com (Pierre) On 7/19/06, Marcus Boerger wrote: > Hello Pierre, > > Wednesday, July 19, 2006, 3:56:15 PM, you wrote: > > > On Wed, 19 Jul 2006 15:32:42 +0200 > > christian.stocker@bitflux.ch (Christian Stocker) wrote: > > >> > >> > >> On 19.7.2006 15:24 Uhr, Richard Quadling wrote: > >> > For PHP 5.2.0-dev (cli) (built: Jul 12 2006 12:20:25), I get ... > >> > > >> > Fatal error: Cannot use array returned from foo::__get('bar') in > >> > write context in C:\- on line 16 > >> > > >> > But only once, not 1 per line. > >> > > >> > $f = new foo(); > >> > $a = $f->bar; > >> > foreach($a as $key => $value) > >> > > >> > fixes the code. > >> > > >> > >> I know (forgot to mention it), but still annoying as I have to fix a > >> lot of lines to do that. > >> > >> If there are technical reasons for the fatal error, fine, I have to > >> live with it then. > > > If there is good reasons for this change, it should be a good candidate > > for E_STRICT but not E_FATAL/RECOVERABLE. > > Wrong answer and not an option at all - sorry. But we are actually > preventing potential SEGVs here. Just like the mighty reference thing that > lead to PHP 4.4. You don't have to answer in a bad way when Dmitry nicely already explained the reasons. Especially when we all agreed on the main cause. > Why not write one since you are obviously aware of this. I wasn't until this > very momnet as i never use __get(), since i know it has too many issues and > causes to many problems. So here i am probbaly the wrong person to write > something. I retire my offer, do it yourself, you know it better. And you should have done it in the first place. --Pierre