Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110803 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49855 invoked from network); 1 Jul 2020 17:55:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jul 2020 17:55:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AF61B180570 for ; Wed, 1 Jul 2020 09:44:31 -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=-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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (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, 1 Jul 2020 09:44:31 -0700 (PDT) Received: by mail-il1-f169.google.com with SMTP id i18so21640420ilk.10 for ; Wed, 01 Jul 2020 09:44:31 -0700 (PDT) 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 :cc; bh=rPcxgguZBdW05Zj4LJ7atfDLi/SK2Wi3KBMjB2tA6TU=; b=W6U161zGGkeAgJKOLREJq9Pu+gDVv8j0U/x2uCFugEUoEHcV9BEFVNoG7KtogZfNVH MLYogYX4CWzacJkbIWv8jYY+iBmIAxD8+Hhz2Daa9yXLyNGbSaMsP0wwZW09vZEZg7S8 cs7JOr1kQMcriRd/FcwEQ1XFBQcaOQvmsj3eD+VaGRDehcLKglROj6tFecg8T691+b32 YMMTsSiJlOm/ipS2+0m/Sdp+b05DoBn6DpXF8yhsfGMqKNNQNNuTi1UDJtmHlxEgcH1p 67/G9WJgW4asoSBIKq78Wy2Mc48/nF+vvMQOhS+wptDuftk9EEHMOlTd9WwVbFnbujto jioA== 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=rPcxgguZBdW05Zj4LJ7atfDLi/SK2Wi3KBMjB2tA6TU=; b=ssZe7k7I3Ei+ymf0LhLdd42+z3VERrpzWARTkAdI9WUTneOBTZkjPNufoDN+v+XwRo A0IGx1nB4czIaaF7Sdzg5ZPnkbsbcb+nyDPn1/1xsVm7O+v3IFn2H1vJqLA0Y3cu6f2T J1sW815iBEbcp/WC/ysAJ0R55G5GR5fOZ7Ky8lJlTBSJdQOXXrRd1dJYUlSoSo5h8Aox qCDTqQvuhW+/XIUNmjohQLfzmG/n/pMxruHx7Lzqr6b9RrxTN2quF6SeflTejG4DX5/7 Vb3+ENEWbMaX2m1D9xHhpmGyGlDQ2U+6V0dnPb5J/HrzNM5/o+L5Ocvz+IoLlXarpnJu i75Q== X-Gm-Message-State: AOAM530IIXmM+8vIcztfrd/Uh+EhO4BELEZOv0V8o9ILLzH+D02RZXju rNlEFIA82AOBk+NRLLgN3z+n4Zog2Ug+ECwntVA= X-Google-Smtp-Source: ABdhPJxv00686sqtToIG9UU6SE56eU3xuajK5AkKBKxw0Fb51Ddy3vcfqtw0Kv+V68VuaJsVIWMcHFHoIDEC3AjdIHQ= X-Received: by 2002:a92:10a:: with SMTP id 10mr8374470ilb.172.1593621869997; Wed, 01 Jul 2020 09:44:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 1 Jul 2020 17:44:16 +0100 Message-ID: To: "G. P. B." Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000077b30505a9640172" Subject: Re: [PHP-DEV][RFC] Saner numeric strings From: rowan.collins@gmail.com (Rowan Tommins) --00000000000077b30505a9640172 Content-Type: text/plain; charset="UTF-8" Hi George, On Wed, 1 Jul 2020 at 15:26, G. P. B. wrote: > > 2. Emit the E_WARNING "Illegal string offset" and evaluate to 0 for > offsets like '2str', and emit the E_WARNING "String offset cast > occurred" for float numeric strings like '2.5' I'm not clear how this option fits with the rest of the RFC; there's no explicit mention of evaluating values to 0 which would previously have been evaluated differently. That would fall into the most significant category of BC breaks: working code in version X still works in version Y, but produces different results. At the moment, the "Backward Incompatible Changes" section just says: > code with liberal use of leading-numerical strings will need to be updated It would be good to expand that with examples of what such code would look like, how it would behave before and after, and what updates the user would need to make. Regards, -- Rowan Tommins [IMSoP] --00000000000077b30505a9640172--