Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41189 invoked from network); 8 Feb 2016 11:12:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2016 11:12:05 -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 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wm0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:38476] helo=mail-wm0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/80-36326-40878B65 for ; Mon, 08 Feb 2016 06:12:05 -0500 Received: by mail-wm0-f51.google.com with SMTP id p63so110516473wmp.1 for ; Mon, 08 Feb 2016 03:12:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=hZXGU2x+lT9o0N+gc9+8gxZTuT5XC0jI6+IDd0rQ2B4=; b=hjLNVaoaDKZdPSI+Mrl//ODezE6DtFsbcC7dmEKdT+6T0GbWrWMMdm/V7v6rF5JCmg VJUnEruiTCeRZAgqFTSOZkgrlo0Sz2q1sWSJiYX1KOuddF/EZ+yG/bygrNVd2v8VobJy QAEvlucN7JPe4ZOxSVYFvi8bsJaw3zojWYNcjX0Qd8amDh0kfkDlBMjrldEVu7d+wWho QXHfAIM7OfVvU2up6YJH4412U4reIbmVWQ879Irt1XVgR+8fwkgokLFPapN4HNR1LkN5 SPyESrDn2R0itO/aK5Lx3LnA9ZWYif+gRpk2CoKVLQCfX9li5ansA3ErzWAO5Vt64Z5k x/Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=hZXGU2x+lT9o0N+gc9+8gxZTuT5XC0jI6+IDd0rQ2B4=; b=hADSkwFbZn0J8EeWNFnI/F3xXuewzoK82iwIWa8Ksbf4qRYjK57JKs2E7SbwjehXDU wBho5sb6Zh4BaNxtZC1CYdQy4AacZvPBN7DrZ8AbFMBOpvCdWb8JWnGmFFUvZY3ZMJ93 tC6rKNxK38LIoxliI+qf6F98PPRnpkSrc2iF5EqFfXoLxhYgUGYyxH7Eku1jUXmFYYga PMDumWLdWZ0bd/C+ul6AdxZKyiOODaKmYZE/0K8rgqfgH7pp1ZExfcBWDe1VyUYB8tCY 5x6HtlwyMhqK0T5Nol80vuILlLy9doIRnEvFazeoVTpa9UD6r5mzRlivOF9C4247Ye4Y UACQ== X-Gm-Message-State: AG10YOTT5crkqpzLvP9KAa+nyegbPpYQwaB+upbGTUD+bdmlX+S+1GnjIjavPZjuapK53A== X-Received: by 10.194.83.105 with SMTP id p9mr26469140wjy.179.1454929922373; Mon, 08 Feb 2016 03:12:02 -0800 (PST) Received: from [192.168.0.152] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id xx3sm29234587wjc.32.2016.02.08.03.12.01 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 03:12:01 -0800 (PST) To: internals@lists.php.net References: <56A3A01F.1020500@php.net> <56AE8735.4070901@gmail.com> <56AFC8CC.6040201@gmail.com> Message-ID: <56B877AD.4020105@gmail.com> Date: Mon, 8 Feb 2016 11:10:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Generalize support of negative string offsets From: rowan.collins@gmail.com (Rowan Collins) Nikita Popov wrote on 06/02/2016 15:16: > In any case, while this is no doubt an interesting question, and one we > should resolve, it is tangential to this RFC and this RFC should make no > recommendations either way. I would prefer not to be forced to vote against > this RFC due to the inclusion of the unnecessary and unrelated "In the > documentation" section. A different proposal should concern itself with > this matter. There is one case where it is highly relevant - if the aim in the future is to make string offsets behave more like array offsets, then this RFC should be rejected. My reasoning being that negative offsets are legal in array access, with a different meaning, so adding this feature increases the difference between string and array indexing. Many of the other differences are - in theory at least - resolvable. e.g. $string[1]++ could be equivalent to $temp = $string[1]; $temp++; $string[1] = $temp; If making string access similar to array access is a lower priority than adding features such as the one in this RFC, then the case for switching to {} is strengthened, but not conclusive. Regards, -- Rowan Collins [IMSoP]