Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112094 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67301 invoked from network); 21 Oct 2020 20:30:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Oct 2020 20:30:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C91B81804C0 for ; Wed, 21 Oct 2020 12:47:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 21 Oct 2020 12:47:55 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id c21so3840035ljn.13 for ; Wed, 21 Oct 2020 12:47:54 -0700 (PDT) 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:cc; bh=JWb0V3Bq67TUAh+0kfCThYsYzbZSd3tOQipvX8PWTjY=; b=TN/s9B0W90rl+U4cD4bRPv7HwX0y/uH6dWTRWIOuSMZTU7vqsa5/lmCFT3f54AwDEa Jf7mINzq480X7a4p7m8bCk6eSQ6ECRd6JbZ1DScSkaGe9Fjmdi4idYx9GYqrVv0RM1cM cyIiw0rTdEGjRpAnCIdSi13g0psFRW0U0lU/fZS16lbLzTbWySiE5FFPcjmtJCQgzOwD PR7FXOnnXEoJNI+Qt6k7fm7KdmoRzeXzsT6LQ70x6/s6Uok7enbtLVa1IdEbkuUFLi9U wowpg0G79RpUSWN5RkvcTYdJGiYlh4j1Z+DgKQzOK/qwREym5t3PbR/1FbTks3Vn3Jat PfpQ== X-Gm-Message-State: AOAM530ZPaXIH22hakPFC1+6A7J1JUkkqWXOg9V7p7Z/PBkNkCgOGIWN 3vfv1lnXMx3qOUdgzkPNaAB5U2sRQhHGNIU06wppag== X-Google-Smtp-Source: ABdhPJw4n3ZXT65oC63m6xiqBcWzRdhJ04xLdLP8w5c0FeqwL66ktN2lDrWj2yxm/f3RlGs/hOrLmxGjI5cXyDrsHRo= X-Received: by 2002:a2e:7e06:: with SMTP id z6mr2131769ljc.172.1603309673488; Wed, 21 Oct 2020 12:47:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 21 Oct 2020 14:47:42 -0500 Message-ID: To: "G. P. B." Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008db81605b2339fca" Subject: Re: [PHP-DEV][RFC] Add support for explicit octal notation for integer literals From: pollita@php.net (Sara Golemon) --0000000000008db81605b2339fca Content-Type: text/plain; charset="UTF-8" On Wed, Oct 21, 2020 at 9:59 AM G. P. B. 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 --0000000000008db81605b2339fca--