Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80341 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13257 invoked from network); 11 Jan 2015 01:53:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2015 01:53:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.47 mail-qg0-f47.google.com Received: from [209.85.192.47] ([209.85.192.47:52768] helo=mail-qg0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/09-48183-287D1B45 for ; Sat, 10 Jan 2015 20:53:06 -0500 Received: by mail-qg0-f47.google.com with SMTP id q108so13869323qgd.6 for ; Sat, 10 Jan 2015 17:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=nfMHBziwPxv9hxdgtDBrZFnL8hW42ZGftlpx3xIxesA=; b=pV9/gf/DZKq+QR1rxZ8ECFAES5lj+8LG0T3q2JIUlsKJGLY/bURtH44tfrtihvwACj XH34JIABgCvQvqMcmvxJEAUYoM4JBtHu2eyIX/jgC9xoqYiyvIJJkeXAK+ilN4m0wMIn Z+jvbODO+IDTO80yCV0ttokSlAlmNEeNM3RztZt/Ahg+tx51Ht/YJ9hdYMIT+aZ72t5/ dlwSk7xpJaWEWZpPCGIw5Em6gWAbiL2ZjXRZ4XqhgGom3Dm7vM8++q2by11j25AjggHU c6tFWUer0hiM46emeQZNGXEU/AFeRDsh41KTLtfQYZb2JIEVOmcxuiL1rhODWR0L9oqn 2vHw== X-Received: by 10.224.111.194 with SMTP id t2mr37555495qap.86.1420941183511; Sat, 10 Jan 2015 17:53:03 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Sat, 10 Jan 2015 17:52:23 -0800 (PST) In-Reply-To: <54B1BC0F.20703@gmail.com> References: <54B1BC0F.20703@gmail.com> Date: Sun, 11 Jan 2015 10:52:23 +0900 X-Google-Sender-Auth: WfwAuy5C1nO60pfwJqNrBwarRUo Message-ID: To: Stanislav Malyshev Cc: Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=047d7b6045827d7549050c56a6f2 Subject: Re: [PHP-DEV] [PATCH] Fix octal parsing (finally) From: yohgaki@ohgaki.net (Yasuo Ohgaki) --047d7b6045827d7549050c56a6f2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, Nice fix, Andrea! On Sun, Jan 11, 2015 at 8:55 AM, Stanislav Malyshev wrote: > > A longstanding PHP bug is that invalid octal digits simply terminate > > the literal and are > ignored, rather than generating a compile error. Thus, this is valid: > > > > $x =3D 0109; // same as 010, or 8 > > > > I see no particular reason why this behaviour should be preserved. > > I=E2=80=99ve written a patch that would finally fix it, and avoid simil= ar > > parsing issues in future (e.g. the resurgence of the hex addition > > bug), by erroring when strtol doesn=E2=80=99t reach the end of the lite= ral. > > I think it's a good idea. It is a BC break but I think it's a kind of > things that we can and should fix in PHP 7. Not sure if it needs an RFC > - technically it's still a break. I personally would just let it go as > is but if anybody objects I think then we should have RFC and a vote. Invalid literal should not be allowed. It's bug in script anyway and just a simple bug fix in engine. It should be ok for new major release w/o RFC as long as it's mentioned in UPGRADING clearly, IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --047d7b6045827d7549050c56a6f2--