#20644 [Opn->Fbk]: in some cases ++ operation DOESN'T work

From: Date: Wed, 27 Nov 2002 02:37:55 +0000
Subject: #20644 [Opn->Fbk]: in some cases ++ operation DOESN'T work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25927@lists.php.net to get a copy of this message
ID: 20644 Updated by: sniper@php.net Reported By: yury@krasu.ru -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Win32, FreeBSD PHP Version: 4.2.1 New Comment: Not known and most likely user error. Please provide a reproducing script. Previous Comments: ------------------------------------------------------------------------ [2002-11-26 07:32:11] yury@krasu.ru After installing PHP 4.2.1 in some time I noticed a strange bug: at some situation increment operation (++) didn't work! I failed to write a simple code to reproduce that bug (it occurs regular at the same situation in nested functions of a rather big project), but in short - when trying to increment by ++ operation a function parameter, which was setted to 1 as a default parameter value of upper function (which called that function), incrementation does NOT happen. and such code as echo $newteamid; $newteamid++; echo $newteamid; $a = $newteamid; echo $a; $a++; echo $a; produces an output: "1111" but if I use " += 1" instead of "++" all works ok (and I was to make so at my project) as I mentioned I tried to reproduce that bug at simple code, but it works ok in a short program with the same variables values. and the same occurs at PHP 4.2.3. if that bug is not known I can try to write an example for this (dont wanna waste a time if it's well-known) but please confirm that ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20644&edit=1

« previous php.bugs (#25927) next »