Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77656 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57951 invoked from network); 26 Sep 2014 08:38:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2014 08:38:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.169 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.169 mail-vc0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:35768] helo=mail-vc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/16-27411-A1625245 for ; Fri, 26 Sep 2014 04:38:50 -0400 Received: by mail-vc0-f169.google.com with SMTP id id10so7970126vcb.14 for ; Fri, 26 Sep 2014 01:38:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=jIH5Sj1RILWCKqrqJEkBmxt5h6GGAIaD/DzH4WsrhDA=; b=A3BVAzQpI4kjpblxYezEicpeCaiID9DsakHnbSp19gXOvT4ZDWHkNmkLmhFf+su3uF uKE2mIT91ocNjJQMV8yyfiB5pDGo/G6pHsczkfwAdJsCnqBmuaMg43ZMtZ4gRkVriwcg DsayqFb/yDR9djqtJ301OTjfwZXwptbnMJ2VwajsHiwgtxl5vcBfftf+EKxzfuayKekv COuAGiC17Gc/GVzhCgLcUO5emrXCJsqHafVg+Nrib+DhQA38Oz4gS/pjWWBVAzqPUMbj tbYsIqX7Ud1utCNAUdhierFH0uANu6iaz9UiXxImxPTefyWgx14hhtQq+rLNrZz6Cw3K 1p4g== X-Gm-Message-State: ALoCoQl+RcJHTgqFMMnZEpcb9ShgoZ7v1XNy5NP968ZWvD4nNifg5YOUQ/4RyI3xaBAK97FgqK5TUrokpJWe+EiXMzfuLeKCxrQO6HgOBOQbmeSEyEMyrC0hZsII4XrLV55Vafn7Q3bkhAs2WxzKeE3+XkPs7NifWw== MIME-Version: 1.0 X-Received: by 10.52.146.17 with SMTP id sy17mr12385358vdb.29.1411720727386; Fri, 26 Sep 2014 01:38:47 -0700 (PDT) Received: by 10.52.158.197 with HTTP; Fri, 26 Sep 2014 01:38:47 -0700 (PDT) In-Reply-To: <542512B4.3000200@sugarcrm.com> References: <54248E27.1040206@sugarcrm.com> <54250F32.4080807@sugarcrm.com> <542512B4.3000200@sugarcrm.com> Date: Fri, 26 Sep 2014 12:38:47 +0400 Message-ID: To: Stas Malyshev Cc: Leigh , PHP Internals Content-Type: multipart/alternative; boundary=bcaec52d59877a71e60503f3d86d Subject: Re: [PHP-DEV] [VOTE] Fix list() behavior inconsistency From: dmitry@zend.com (Dmitry Stogov) --bcaec52d59877a71e60503f3d86d Content-Type: text/plain; charset=UTF-8 It's an inconsistent undocumented behavior, that started to work not by design, but because of implementation issues. NULL NULL By the way, I'm agree, keeping string support might be better for compatibility. Thanks. Dmitry. On Fri, Sep 26, 2014 at 11:16 AM, Stas Malyshev wrote: > Hi! > > > * Strings are _not_ treated as arrays of bytes everywhere. > > This is true. However, sometimes they are. E.g., $string[0] is > meaningful, while array_flip($string) is not. > > > * If we intend to give strings more array-like support after this RFC > > We don't intend to give strings anything - both $string[0] and list($a, > $b) = $string works right now. See here: http://3v4l.org/7AZFZ > > So you are arguing for BC break for no reason at all. > > > (like foreach($string as $char), making array_* work with strings), > > Nobody proposed that in this RFC, and it makes zero sense to propose it > in this RFC, as this RFC is about list(), not about making strings into > arrays which would require humongous amount of work and was not > requested by anybody. > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --bcaec52d59877a71e60503f3d86d--