RE: [PHP-DEV] bool values and increment operators?

From: Date: Sun, 07 Apr 2019 16:08:36 +0000
Subject: RE: [PHP-DEV] bool values and increment operators?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-105133@lists.php.net to get a copy of this message
It there anyone working on this? If not, I'd like to prepare a RFC targeting PHP 8 to address this issue. In addition, I'm thinking whether it's possible and necessary to add a global strict mode (like "use strict" in js) in PHP 8 to deal with this kind of unexpected surprise. I know we have declare(strict_types=1) but it only works for functions and it's limited to call from current file. -----Original Message----- From: Andrey Andreev <narf@devilix.net> Sent: Monday, March 25, 2019 11:43 PM To: Chase Peeler <chasepeeler@gmail.com> Cc: Christian Schneider <cschneid@cschneid.com>; Dan Ackroyd <danack@basereality.com>; PHP internals <internals@lists.php.net> Subject: Re: [PHP-DEV] bool values and increment operators? Hi, On Mon, Mar 25, 2019 at 5:09 PM Chase Peeler <chasepeeler@gmail.com> wrote: > > 1.) Update the documentation to add booleans to the second list > 2.) Update the documentation to remove the second list - anything not > in the first list is not affected. > 3.) Update the language so that ++ and -- cast booleans to ints. > 4.) Emit warnings in those cases? I don't see a problem with how it currently works, but I do see a problem with it being silent. Cheers, Andrey. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.internals (#105133) next »