Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104759 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87024 invoked from network); 15 Mar 2019 21:17:52 -0000 Received: from unknown (HELO mail-it1-f173.google.com) (209.85.166.173) by pb1.pair.com with SMTP; 15 Mar 2019 21:17:52 -0000 Received: by mail-it1-f173.google.com with SMTP id g17so11555403ita.2 for ; Fri, 15 Mar 2019 11:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RMHHdDbTsDh2LN5XEjGqj3FPEJTZwPPibfRCSfE/KnM=; b=L3cD3dBa4d9/UpM3OME9uubt1voOEFOozsdr4U53ekHs4JOcpZRBoMgWA9FJ7V1k0e JY0Q66szSx/Y0mDmEpVXEUj+TBULAWsi3DubJmPlnnvpKDQnwq+kD7d9Y77l7f2X0yK9 GFx4mMm7bltjbz32DsnCrCOtpabQhAc918a0vUgVvtyFXwukRwQy1ixncmM2gjhHETxd YFgsiB6BB5lTdZI460Fbs8gTGgf2/QHMbvCiPvt0pwm0ZQUMcVLyoY5YoWBwyYR7MSVo z+EZqnnzGnmhWq0yUjLnxGcb6ZNqjerVXtQRpZmRnQI0rgBumID81eFkv4MP5Z4Hosqh rRnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=RMHHdDbTsDh2LN5XEjGqj3FPEJTZwPPibfRCSfE/KnM=; b=j9nBk/O2mfW2IsFeTKty6+tuuM+iuT/q/m3zCniSm4paeOdZ6z4FRjvhxUL1TCK/IH d9HkXf7bF1SQDPCtov9MxJJxJkrbQAh2FNxxu5Pjq/M3A4y9B26or3kLHfQd1v5frPBf 2JJbvTAmkkdViz130usegIi6iUC/wqAfnVGLij6VLGsbXu4mO1v84HQplgpeqFGQ6zJd allL2n0nCsyTLtXYZMRirkZvT1RhF9PAVr2ngDoufVjK1Vk1yfa4yg4/Dy9BhCHKxeu8 8WNN2JL1999QTONclBUgKJfNeNLPKvy4jpPi4zw6VE4eICgNiew/d2bwnvUxnZHtpHDP cMhA== X-Gm-Message-State: APjAAAUGJj5wSaY279aXys7p9enGrt4usOwETH84X8G7v3a+tMNrkJfW tAzdXCWsXtw7GxmpI0oNNwPWtzZ+sFH+QgpcP3/iuWef X-Google-Smtp-Source: APXvYqwwblphMN2Fmkso/nfhy+UFIOlF6rPVgviaz7UUB+iSBce2RR2Jj12uDPNjxSar3QHNz8GtISqJejiQ9x5Xs8w= X-Received: by 2002:a05:660c:185:: with SMTP id v5mr3039075itj.34.1552673313772; Fri, 15 Mar 2019 11:08:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 15 Mar 2019 18:08:22 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000051da78058425ed99" Subject: Re: [PHP-DEV] Proposal for deprecate alternate syntax(curly braces) for array and string access From: rowan.collins@gmail.com (Rowan Collins) --00000000000051da78058425ed99 Content-Type: text/plain; charset="UTF-8" On Fri, 15 Mar 2019 at 17:53, Levi Morrison wrote: > 1. I cannot think of *any* reason to separate them. If you want to > make sure you are indexing a string, *do a type check*, not bake `{}` > into only working on strings. > I think it's more common to do the opposite: think you're working on an array, and accidentally pick up a string. If we separated the syntaxes, it would be possible to always raise a warning when that happens, rather than silently returning the Nth character. To be honest I can't remember the last time I used *either* syntax for string access, other than by accident. Regards, -- Rowan Collins [IMSoP] --00000000000051da78058425ed99--