ID: 10734
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: *General Issues
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

Fixed in the CVS.  Thanks for the report!

Previous Comments:
---------------------------------------------------------------------------

[2001-05-08 11:44:43] [EMAIL PROTECTED]
AFAIR this is some strange magic borrowed from perl

the deeper sense in this is that you can use it
to increment/decrement the numerical part of
serial numbers and such

IMHO this is more confusing then helpfull and
should be nuked 

---------------------------------------------------------------------------

[2001-05-08 11:26:43] [EMAIL PROTECTED]
Here is a simple code

<?
header("content-type: text/plain");

$num = -5;
echo "$numn";
$num++;
echo "$numn";
$num--;
echo "$numn";
echo "----------n";

$num = "-5";
echo "$numn";
$num++;
echo "$numn";
$num--;
echo "$numn";
?>

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.


---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10734&edit=2


-- 
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]

Reply via email to