Date: 05/08/01
- Next message: Boian Bonev: "Fw: [PHP-DEV] 4.0.6"
- Previous message: jbozza <email protected>: "[PHP-DEV] Bug #10733: configure --disable-short-tags doesn't disable short-tags"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: konrad <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: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Boian Bonev: "Fw: [PHP-DEV] 4.0.6"
- Previous message: jbozza <email protected>: "[PHP-DEV] Bug #10733: configure --disable-short-tags doesn't disable short-tags"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

