Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28571 invoked from network); 24 Mar 2016 17:07:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Mar 2016 17:07:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=patrickallaert@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.41 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.213.41 mail-vk0-f41.google.com Received: from [209.85.213.41] ([209.85.213.41:35995] helo=mail-vk0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/42-15440-2EE14F65 for ; Thu, 24 Mar 2016 12:07:47 -0500 Received: by mail-vk0-f41.google.com with SMTP id z68so67504463vkg.3 for ; Thu, 24 Mar 2016 10:07:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=uqcQl3X0aVqR5V8AaspipMdT/LxT+Y1qaAMBnXveOvc=; b=fRE3mW+m2/nco94CJZWeYy+CBtZP8jcxFCRDKFZcdP1CGoJf67PrZuAmmA+kOXIFK/ uX1rfMIDZOgJFBgOaAyBT2V8HUzrsInzSRwg3aHXMVoshrtjj/KZXkJmqxNi6fxmYXyi S/WYudGBLRpSCTDbOk4TA/9cBLRsjPWCD8gksh57xqigxDzW4SazGUSH40B24FrnmMjV oGOzZyIR9pfG5Jl8nRsVPGh820jKXE2K6B7D89l/5rGSW8CVt9bNoZD1p1AxJ7jtr8rn e3q34q0ziVtWR0enqm+MIC46YfXz19wmH5bSKC/a08VZCwKe7+TCb8pdbItRAUvQXYZX AKEA== X-Gm-Message-State: AD7BkJLbb4xTCP9tLsLiEvZsE/B0WVRFOVIc4l0h8t21NVGJmmTPbI6XhulkVTlVcMtaPj98OHcWMJ7gMSf9Mg== X-Received: by 10.176.2.144 with SMTP id 16mr5315991uah.148.1458839264246; Thu, 24 Mar 2016 10:07:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 24 Mar 2016 17:07:34 +0000 Message-ID: To: Andrea Faulds , internals@lists.php.net Content-Type: multipart/alternative; boundary=001a113d006021753a052ece7c19 Subject: Re: [PHP-DEV] [VOTE] Warn about invalid strings in arithmetic From: patrickallaert@php.net (Patrick ALLAERT) --001a113d006021753a052ece7c19 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le dim. 20 mars 2016 =C3=A0 03:36, Andrea Faulds a =C3=A9crit = : > Hi everyone, > > I previously opened voting on the "Warn about invalid strings in > arithmetic" RFC, but I had to cancel it because of the issue of > inconsistent handling of scientific notation strings. > > Since then, the RFC has been updated to deal with that issue. This has > meant that the RFC no longer just concerns adding warnings to operators, > but also fixing the inconsistency with how scientific notation strings > are converted in PHP. This has been previously discussed on the mailing > list. > > Now that I have finally completed my patch for the language > specification for the RFC, I feel I can open voting once again. > > So, voting on this RFC will start today (2016-03-20), and will end on > the Monday after next (2016-03-28). > > You can find the RFC page here, which contains the voting widget: > > https://wiki.php.net/rfc/invalid_strings_in_arithmetic > > Please read over the RFC and cast your vote. > > Thank you! > -- > Andrea Faulds > https://ajf.me/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php Hi Andrea, Nice work. I'm globally +0.7 on it, there is however a few things that are unclear to me: * What happens with an empty string? Warning, notice or even nothing? * Would: 42 + ""; produce the same thing than: 42 + null; currently, both are quiet, but both doesn't mean something. * You don't mention the <, >, <=3D and >=3D operators, is that intentional? php > var_dump( 42 < "42 bananas" ); bool(false) php > var_dump( 42 <=3D "42 bananas" ); bool(true) php > var_dump( 42 > "42 bananas" ); bool(false) php > var_dump( 42 >=3D "42 bananas" ); bool(true) It would be illogic, IMHO, to not take those operators into account and would introduce some inconsistencies, that is why I voted "No" although I'm generally ok with the whole idea. Could you clarify those points? I guess you can not put them in the RFC while in voting phase? I personally don't mind and could easily change my vote provided that I have answers to my questions :) Cheers, Patrick --001a113d006021753a052ece7c19--