Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112164 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27672 invoked from network); 3 Nov 2020 19:58:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Nov 2020 19:58:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CAD26180538 for ; Tue, 3 Nov 2020 11:18:47 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 ; Tue, 3 Nov 2020 11:18:47 -0800 (PST) Received: by mail-ej1-f43.google.com with SMTP id dk16so25296085ejb.12 for ; Tue, 03 Nov 2020 11:18:47 -0800 (PST) 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=hSFK4hacId57bn7CuDGBKGz7bkl0/TWwpCW2bLB6ctY=; b=HOXxw5QvFB0tqSDLSezJxDTxpW/fRGV8uDsyKKcGmOiksNLiDJey8tiPqKMzwi6cKM eluptKxRvnDa4DCGfN7IcJAVJx9Mjkstbhy0NluymAYvHzqqA5uOBMFP84DQWprqs1pK RZlGVvSnbst9y3nmq/5g9K/eK6uMEC4eLLi+rbosiud1LgjY3KaG9y0Zsk4F7Z+F/1LB bUWmxy2mStGF04nrn1EVJvty7EGQa5NqelaRCTzHzz8g1dcmLKkidwU+0STiiEKTm5h6 9UzbbnmUfcSKwt09g1Vq4EO+ydSyFFtHHvUmaUv9WDLNw99KYD+ikoxcDzw9L2HKBdPR M4dA== 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=hSFK4hacId57bn7CuDGBKGz7bkl0/TWwpCW2bLB6ctY=; b=P9ygI1NiivkBuGSXuvzXlgaSih/LWp9fLypRkjBAyy6Vzx3o4gNoz6DR8E9W9/8QsM AYFygRJGKbxOrJ8VDGKLDLs6S0hm3YNhrgB/N8fAkUQpsAgo+uDuDu4EvSXqgnYWOviL daVal4avRFcuuf+CdhgEQFZs8ALDISDZpzWzdNfA44Vsn2pbGT4g/pLOwoGcztdYuH67 phFWpy78EEoBNwMLH7rgZpdcdjuhWoxf1TvWLpB+c1mSif4ZHrZEyiFabGj85CgNo+Pw ajnlYRYcvDNxVyh0Vii4uaaf5bFvtajc9PpMBQM0EG6we1n/WOnObx4UDpCxVFywQFi+ ekuw== X-Gm-Message-State: AOAM531TRA+WtSExEJQcnnSR+x3U8zyrjCKd6q6wSD0GfyJ+W1Cvmg/S MsbhvHH+sASwf/cGeDxqpqpYUxXCtQZ0u0H6JP4= X-Google-Smtp-Source: ABdhPJwyguw6OzyXiLVoT6rU3xkCxEPE40wsO/D3QY6VYlD2pgeRtw6gVomVX56GRnXtfZeBRPTRQTxSyKrpYoFIen0= X-Received: by 2002:a17:906:3b91:: with SMTP id u17mr21243778ejf.504.1604431124773; Tue, 03 Nov 2020 11:18:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 3 Nov 2020 19:18:32 +0000 Message-ID: To: Eugene Sidelnyk , PHP internals Content-Type: multipart/alternative; boundary="00000000000042474d05b338bb47" Subject: Re: [PHP-DEV][RFC] Add support for explicit octal notation for integer literals From: george.banyard@gmail.com ("G. P. B.") --00000000000042474d05b338bb47 Content-Type: text/plain; charset="UTF-8" On Wed, 21 Oct 2020 at 16:56, Eugene Sidelnyk wrote: > What is the practical use case for this. I think it will make code a bit > more confusing > > On Wed, Oct 21, 2020, 5:59 PM G. P. B. wrote: > >> Hello internals, >> >> 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. >> >> Best regards >> >> George P. Banyard >> > Please send all replies to the list as no one else can see them. (And please don't top post). I don't understand how this can be *more* confusing than: 014 evaluating to 12 because it's interpreted as an octal. The point is to make it explicit that it's an octal number in the same way we have 0x1A = 26 for hexadecimal numbers, and similarly 0b prefix for binary integer literals. Regards, George P. Banyard --00000000000042474d05b338bb47--