Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77637 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5042 invoked from network); 25 Sep 2014 22:08:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2014 22:08:36 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:52518] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/00-04944-36294245 for ; Thu, 25 Sep 2014 18:08:36 -0400 Received: by mail-wg0-f42.google.com with SMTP id a1so8185093wgh.25 for ; Thu, 25 Sep 2014 15:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=E9+qMmP75e9lWQRbowtqxiYiopkHnjeYhhMnlOZlYOU=; b=IEIu+4Rg7h50NOg0fXTXGBDQzJlHdfagw0k/HG9+4MJAaMD+ncICl2WtQhcaHzP6nH XuRNmWCX8lf42eSD5BQ77yqxfyyEhYgNWW32fKKjNKmABOgEgQjYHf0CV3wxmLfZGhl5 XtFkws1r9VhEW8FrldsZrZihy69KtuIMKgqO5rnUs2nelVN2kokifmL7vBmIeruwKoL5 m+G5BjQJkgFs3zR7dh+JCpzTx+alMHm1z5954Jz+4DFVgmqpYMDUmzms+EVIVzTOl7vX 3KnKQp5SUPQVLdFVaYtkODoUih0qflmgRs0v9WLbKrFTwGJP5UTTGSwdh4C00d8PTeMG 33dA== MIME-Version: 1.0 X-Received: by 10.180.231.9 with SMTP id tc9mr20069138wic.58.1411682912621; Thu, 25 Sep 2014 15:08:32 -0700 (PDT) Received: by 10.217.55.195 with HTTP; Thu, 25 Sep 2014 15:08:32 -0700 (PDT) In-Reply-To: <54248E27.1040206@sugarcrm.com> References: <54248E27.1040206@sugarcrm.com> Date: Thu, 25 Sep 2014 23:08:32 +0100 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE] Fix list() behavior inconsistency From: leight@gmail.com (Leigh) On 25 September 2014 22:50, Stas Malyshev wrote: > Hi! > >> It was on design. list() was intended to support plain arrays only. > > I'm not sure I'm getting this point - why list($a, $b) = $foo is not > just translated as $a = $foo[0], $b = $foo[1], etc.? Is it hard to make > it work that way? > Why do array_* functions not treat strings as arrays of bytes? If we we can/want to make strings byte arrays, then I am 100% in favour of all array operations working on strings. If this is something we want to work towards for the future, that's great, lets get busy :) - If we want to say "yea list() should work with strings", but no other array functions should work with strings, it seems very odd to me.