Re: PHP 4.0 Bug #5331: ++ operator
| From: | Andi Gutmans | Date: | Sat, 01 Jul 2000 18:09:25 +0000 |
| Subject: | Re: PHP 4.0 Bug #5331: ++ operator | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23165@lists.php.net to get a copy of this message | ||
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
At 05:23 PM 7/2/00 +0000, zork@clan.pl wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/From: zork@clan.plOperating system: Linux (Slackware 7.0)PHP version: 4.0.0 PHP Bug Type: Scripting Engine problemBug description: ++ operator Deep in my program I have such fragment: list($newkey) = $db -> getrow(); $newkey++; $data[$key] = $newkey; And $newkey++ doesn't work! If i change $newkey++; to $newkey = $newkey + 1; everything is fine - newkey gets incremented. But It doesn't with ++ operator. Don't have time now to shrink the code to the smallest one that produce this behaviour and to upgarde to 4.0.1 - I will do it in one or two weeks. regards £ukasz Michalski. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net