note 74176 added to language.expressions

From: Date: Wed, 28 Mar 2007 17:48:03 +0000
Subject: note 74176 added to language.expressions
Groups: php.notes 
Request: Send a blank email to php-notes+get-124889@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 74.118.123.241 ---- Manual Page -- http://www.php.net/manual/en/language.expressions.php Edit -- https://master.php.net/note/edit/74176 Del: integrated -- https://master.php.net/note/delete/74176/integrated Del: useless -- https://master.php.net/note/delete/74176/useless Del: bad code -- https://master.php.net/note/delete/74176/bad+code Del: spam -- https://master.php.net/note/delete/74176/spam Del: non-english -- https://master.php.net/note/delete/74176/non-english Del: in docs -- https://master.php.net/note/delete/74176/in+docs Del: other reasons-- https://master.php.net/note/delete/74176 Reject -- https://master.php.net/note/reject/74176 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124889) next »