Le dim. 20 mars 2016 à 03:36, Andrea Faulds <a...@ajf.me> a écrit :
> 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 <, >, <= and >= operators, is that intentional? php > var_dump( 42 < "42 bananas" ); bool(false) php > var_dump( 42 <= "42 bananas" ); bool(true) php > var_dump( 42 > "42 bananas" ); bool(false) php > var_dump( 42 >= "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