From: [EMAIL PROTECTED]
Operating system: Linux 2.2 glibc-2.2.1
PHP version: 4.0.5
PHP Bug Type: *General Issues
Bug description: Strange conversion string->numbers
Here is a simple code
<?
header("content-type: text/plain");
$num = -5;
echo "$num\n";
$num++;
echo "$num\n";
$num--;
echo "$num\n";
echo "----------\n";
$num = "-5";
echo "$num\n";
$num++;
echo "$num\n";
$num--;
echo "$num\n";
?>
And here results
-5
-4
-5
----------
-5
-6 <-- ?????????????????
-7
It looks like "++" operator do not work properly on variables enclosed in
double-quotes.
Other operators (ie $num = $num +1) woks properly.
--
Edit Bug report at: http://bugs.php.net/?id=10734&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]