Re: [RFC] Add support for explicit octal notation for integer literals

From: Date: Wed, 21 Oct 2020 19:47:42 +0000
Subject: Re: [RFC] Add support for explicit octal notation for integer literals
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-112094@lists.php.net to get a copy of this message
On Wed, Oct 21, 2020 at 9:59 AM G. P. B. <george.banyard@gmail.com> wrote: > A rather short RFC about adding support for the "0o" prefix for octal > integers. > https://wiki.php.net/rfc/explicit_octal_notation > > Surprisingly PHP already accepts the prefix within octdec() and > base_convert(). > > I have hopefully covered all the cases where this may apply but if you find > another one please let me know. > > +1 As for deprecating the old syntax in the future, I'd be in favor of that. I've been bit by this subtle number format a couple of times and writing a tool to auto-convert to the new format is trivial. Here's about 3 minutes worth of effort, for example: https://gist.github.com/sgolemon/6f9fbb3a95352cbab9297319022d19a5 -Sara

« previous php.internals (#112094) next »