Re: PHP 4.0 Bug #5331: ++ operator

From: Date: Sat, 01 Jul 2000 19:14:07 +0000
Subject: Re: PHP 4.0 Bug #5331: ++ operator
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23166@lists.php.net to get a copy of this message
Andi Gutmans wrote: > Can you do var_dump($newkey) after the list() line and tell us what the > output is? My guess is that $newkey isn't an integer and therefore it is > behaving differently than you expect it to behave. Might be a misfeature > but then again it might not. Once we know what the type is we can think if > what's happening makes sense or not. > > Andi > It returns: string(20) "1 " (19 spaces in page source) Now I see why this happened. I should set $newkey to integer before incrementing it but, it shouldn't be that $var = $var + sth behaves diffrient that $var++. I think it should be changed that all variants behaves the same way. regards Lukasz Michalski

« previous php.dev (#23166) next »