Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34093 invoked from network); 14 Sep 2014 17:26:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2014 17:26:58 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:62156] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 04/1C-53483-DDFC5145 for ; Sun, 14 Sep 2014 13:26:53 -0400 Received: by mail-wi0-f173.google.com with SMTP id em10so2997574wid.0 for ; Sun, 14 Sep 2014 10:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=OVM3SGi2Np3rx5Odtaikgkn4sO4UgmWr3tJcSVsvqdU=; b=ZAXBoVsig6c25kicziGRSn0ORGUyP6qXAjLWWhcypincbup8GhF4cMdW9GSOhFO1GG Io8eKck39RKDNOU176k7bTokPqhY0oPCQTK5LxI1VlOa57nKrd7dm74zI7AjITP04d8U yNe1mxKJCbdSRdV7X5F/kl8sfEPGc848xPIFo648MPZu0/ulo4RLjhpW7KULOvJD/Xu+ ZyjnvSo0IJyLQQ9SoM1ozCw3heKo+jxtjt0ZtPAClZCCLHWn1xnSlLp2xQSqitS13UEO A2HeH8IZTr7ReRCNgdtd0Su6ESzHUZTmMJf/3hW27iZqPf7/pKJ/4lTFxx3Zu0hAPoZk QU5g== X-Received: by 10.180.35.134 with SMTP id h6mr17958133wij.0.1410715609981; Sun, 14 Sep 2014 10:26:49 -0700 (PDT) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id mx19sm8859500wic.3.2014.09.14.10.26.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Sep 2014 10:26:49 -0700 (PDT) Message-ID: <5415CFC0.5020309@gmail.com> Date: Sun, 14 Sep 2014 18:26:24 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54153A26.4080700@sugarcrm.com> <541549B1.7000602@lsces.co.uk> In-Reply-To: <541549B1.7000602@lsces.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Fix list() behavior inconsistency From: rowan.collins@gmail.com (Rowan Collins) On 14/09/2014 08:54, Lester Caine wrote: > 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? Well, currently, every single string function in PHP treats a string as a simple byte array, apart from those in the mbstring and intl extensions. What's more, there isn't really a single meaning of the term "Unicode character" - at its simplest, there are code points, but they're not necessarily the most useful unit; as I mentioned before [1], people often actually want to work with "grapheme clusters", what a writer of the language would consider "a single character". If more integrated Unicode support is ever added, it will presumably be in the form of a new data type; if that type implements $foo[0] to mean "first grapheme cluster", then it would be natural for list($a,) = $foo to do the same. But there is no reason for that to stop list($a,) = $foo being equivalent to $foo[0] for existing strings, and mean "first byte". [1] http://news.php.net/php.internals/72914 -- Rowan Collins [IMSoP]