Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6866 invoked from network); 10 Jan 2015 23:56:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2015 23:56:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:47506] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 95/38-48183-B1CB1B45 for ; Sat, 10 Jan 2015 18:56:12 -0500 Received: by mail-ob0-f179.google.com with SMTP id va2so18020651obc.10 for ; Sat, 10 Jan 2015 15:56:08 -0800 (PST) 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=HgthYVpM8HZVMa9CnOi8umUVM7Lf+tKIUFe3OM2o+eA=; b=aIFr+VR/s5+wa12TIUouYTMKWT+8pNX0nxYK54fiP0hKbElAIW3C2Kh36qIyzWwszj bbJ9na53jK7hWrb2rsc4bxl+Spdleec6gMeyhmZgkyN3ZFQFjucmVS6uyltSQRa1sTY+ g+qa9mTncTKTKCGWXfZvW6E54xRE1hK8KBCUdQY9P/BTlE8R/q8dWzkWb58j55SUSlno ZhGAKdXQUCW6RfpDfe4Lg2hxY3UjrxAMZizyb4Pbc0YDH9Vqfvamg/rUKRuNhpeR1aYW ScaYgAHLljJvRgZoCqO/ndUtqj+Czk3lbCHfuBxwwaIQ2tVdtT07b0w36QxG/ii1NkNR 06Ig== X-Received: by 10.182.112.137 with SMTP id iq9mr13268441obb.31.1420934168632; Sat, 10 Jan 2015 15:56:08 -0800 (PST) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id mq8sm6502124oeb.2.2015.01.10.15.56.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jan 2015 15:56:08 -0800 (PST) Message-ID: <54B1BC0F.20703@gmail.com> Date: Sat, 10 Jan 2015 15:55:59 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andrea Faulds , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [PATCH] Fix octal parsing (finally) From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > 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 = 0109; // same as 010, or 8 > > I see no particular reason why this behaviour should be preserved. > I’ve written a patch that would finally fix it, and avoid similar > parsing issues in future (e.g. the resurgence of the hex addition > bug), by erroring when strtol doesn’t reach the end of the literal. 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. -- Stas Malyshev smalyshev@gmail.com