Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36856 invoked from network); 8 Jul 2017 04:21:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2017 04:21:27 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.128.170 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.128.170 mail-wr0-f170.google.com Received: from [209.85.128.170] ([209.85.128.170:36755] helo=mail-wr0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/96-47109-5CD50695 for ; Sat, 08 Jul 2017 00:21:25 -0400 Received: by mail-wr0-f170.google.com with SMTP id c11so70498489wrc.3 for ; Fri, 07 Jul 2017 21:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=3X35qc6C3c1JXXGC+Sidyk3VcP4na3DFKoy9bqRkIwY=; b=c3rArYouhy5BTmHKs+b6dWdZYqDvOrmJslZOIcq51AnIw6OoYbZtx5e0Lus/yhFqV6 avKZgp0NYUWJG/4oOkg3JKkbR1RKDed1qBzWz9B03bKohpD8AhsyBiblEO1A22kfbDWq 0apkCD3gVEtSoMw0kWlp6IM6J8rvC6DvGKGK1nC2NWTrIV8IGHBRENjOyRWSIYJMTzlw gz1nuSrZh5AuCXUk+1YLPzNpMf94LlSEu7NHTTbzSkxAdIbSWXMcSteD9wJLhREqhFqT Kpe/E76Ngdw24D0V1yNfX5HbZL00Nl9vLF1eJBW70EWZqri71/yN4VNElykWgY41v4m8 wffQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=3X35qc6C3c1JXXGC+Sidyk3VcP4na3DFKoy9bqRkIwY=; b=Go18E2wtMVIKMpQvBf6pRauO+t4/VBk6V5I1IX/IaltGbA+VQmLjHAH0aJNsN/EWwF k21xOLCqR+NQmAUxmwjC8pvybBheUGuhwMJg6uYY1odE5B6XSE689ljPzvbtg5QklQp7 +AdjgwzdO+6YcrWuwUujAIXQn0U4FOig/r6puRAsJ8HKbxA4maJIGrRVbXM2J6yMtEr4 nExFoilsm2DfdaqwfR7fGXFNayJzWj8YgpQWJ80h7/L+yqCSO45QUydzmaldedDHWp4Y 8GilvSBoK/RSqxgvcS00FgoroCBWDf/0UcKuteBstIEEpnGTyXIhrF+gQrA2J2kbKny3 NuiQ== X-Gm-Message-State: AIVw112ROMMwlX3Vi2dMG8nVMmhFs6fobteF6BkuOHAA2Ib6Yg6gzAUp /lDPnQyADwMRBWjPSdUdVuPZNDerRnK+ X-Received: by 10.28.54.217 with SMTP id y86mr1078739wmh.81.1499487681784; Fri, 07 Jul 2017 21:21:21 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.169.139 with HTTP; Fri, 7 Jul 2017 21:21:21 -0700 (PDT) X-Originating-IP: [71.251.16.204] In-Reply-To: References: Date: Sat, 8 Jul 2017 00:21:21 -0400 X-Google-Sender-Auth: G6uzJ1o-oyJT3wVzm3Dni1GAdGg Message-ID: To: Rudi Theunissen Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] ArrayAccess: Constant numeric string offsets become integers From: pollita@php.net (Sara Golemon) On Fri, Jul 7, 2017 at 7:30 PM, Rudi Theunissen wrote: > Bug: https://bugs.php.net/bug.php?id=63217 > PR: https://github.com/php/php-src/pull/2607 > Demo: https://3v4l.org/dagUP > > We should either go full array behaviour, or full array syntax only. The > numeric string optimisation that causes this bug is broken and should > either be fixed or removed entirely. > Agreed. offsetGet() et al should either normalize to keyish values, or do no normalization at all. The current PHP behavior is a half-measure and incorrect by any measure. I like HHVM's behavior here as it gives more power to the script dev. -Sara