#20644 [NEW]: in some cases ++ operation DOESN'T work
| From: | yury at krasu dot ru | Date: | Tue, 26 Nov 2002 13:32:11 +0000 |
| Subject: | #20644 [NEW]: in some cases ++ operation DOESN'T work | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-25848@lists.php.net to get a copy of this message | ||
From: yury@krasu.ru
Operating system: Win32, FreeBSD
PHP version: 4.2.1
PHP Bug Type: Scripting Engine problem
Bug description: in some cases ++ operation DOESN'T work
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 bug report at http://bugs.php.net/?id=20644&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20644&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20644&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20644&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20644&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20644&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20644&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20644&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20644&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20644&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20644&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20644&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20644&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20644&r=isapi