note 74176 deleted from language.expressions by colder
| From: | colder@php.net | Date: | Wed, 28 Mar 2007 18:35:48 +0000 |
| Subject: | note 74176 deleted from language.expressions by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-124892@lists.php.net to get a copy of this message | ||
Note Submitter: sneskid at hotmail dot com
Reason: useless
----
contrary to the equivalence *= and /= should have with their full form counterparts, here is
something to look out for:
<?php
$x=$y=2;
$x*=4+5; // is the same as $x=$x*(4+5)
$y=$y*4+5;
echo($x . '<br/>'); // = 18
echo($y . '<br/>'); // = 13
$x=$y=20;
$x/=4-5; // is the same as $x=$x/(4-5)
$y=$y/4-5;
echo($x . '<br/>'); // -20
echo($y . '<br/>'); // -0
?>
This happens in javascript too.