Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77173 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51374 invoked from network); 14 Sep 2014 07:54:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2014 07:54:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:52302] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/11-39222-4B945145 for ; Sun, 14 Sep 2014 03:54:29 -0400 Received: (qmail 17137 invoked by uid 89); 14 Sep 2014 07:54:25 -0000 Received: by simscan 1.3.1 ppid: 17130, pid: 17133, t: 0.0741s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 14 Sep 2014 07:54:25 -0000 Message-ID: <541549B1.7000602@lsces.co.uk> Date: Sun, 14 Sep 2014 08:54:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54153A26.4080700@sugarcrm.com> In-Reply-To: <54153A26.4080700@sugarcrm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Fix list() behavior inconsistency From: lester@lsces.co.uk (Lester Caine) On 14/09/14 07:48, Stas Malyshev wrote: >> Please take a look and make your opinion. >> > >> > https://wiki.php.net/rfc/fix_list_behavior_inconsistency >> > >> > This inconsistency might be interpreted like a bug, but fixing it might >> > break existing PHP code (at least my attempt to fix it in documented way >> > broke few phpt tests). > I think it makes sense to make list($a, $b, ...) = to mean: > $a = [0] > $b = [1] > ...etc... > > This is how it works in most cases, not sure why it doesn't work when > is a string literal, but I think it should work the same too. Isn't this just a side affect of making a simple string also look like an array? One has to assume first that what is returned is a simple byte string array while currently is IS possible that it will contain unicode characters? So should it not be looked at n the context of the whole PHP7 discussion rather than trying to fix more edge cases in isolation? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk