Re: PHP 4.0 Bug #3399 Updated: postfix increment operator(++) fails to cast string to integer

From: Date: Mon, 07 Aug 2000 09:08:11 +0000
Subject: Re: PHP 4.0 Bug #3399 Updated: postfix increment operator(++) fails to cast string to integer
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-27995@lists.php.net to get a copy of this message
Jouni Ahto wrote: > In theory, the idea is quite nice. But, unfortunately, locales break it. > At least for me, Az++ would be Aå, then Aä, Aö... It will be interesting > to test how PHP and Perl actually behave. Definitely not something one > should rely on... and the way a '-' is treated is at least questionable it perfectly makes sense to not treat it as a negative prefix when incrementing serial numbers like 'abc-001-746', this should still result in 'abc-001-747' but at least as the very first character in a string it should be treated as part of the number to increment so that "$a='-1'; $a++" would result in 0, not -2, as reported in the orignal bug message -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77 fax:-99

« previous php.dev (#27995) next »