note 78397 added to language.operators
| From: | Gautam at osu1 dot php dot net | Date: | Wed, 10 Oct 2007 10:22:19 +0000 |
| Subject: | note 78397 added to language.operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131270@lists.php.net to get a copy of this message | ||
<?php
$result1 = 7 + 8 * 9/3 -4;
$result2 = 7 + 8 * (9/3 -4);
$result3 =(7 + 8)* 9/3 -4;
echo "Result1 for 7 + 8 * 9/3 -4 = $result1 Result2 for 7 + 8 * (9/3 -4) = $result2 and
Result3 (7 + 8)* 9/3 -4 = $result3 "
/*
which gives results as under
Result1 for 7 + 8 * 9/3 -4 = 27 Result2 for 7 + 8 * (9/3 -4) = -1 and Result3 (7 + 8)* 9/3 -4 = 41
Execution Order is 1) expression in brackets 2) division 3) multiplication 4) addition and 5)
subtraction
*/
?>
----
Server IP: 69.147.83.197
Probable Submitter: 208.72.122.102
----
Manual Page -- http://www.php.net/manual/en/language.operators.php
Edit -- https://master.php.net/note/edit/78397
Del: integrated -- https://master.php.net/note/delete/78397/integrated
Del: useless -- https://master.php.net/note/delete/78397/useless
Del: bad code -- https://master.php.net/note/delete/78397/bad+code
Del: spam -- https://master.php.net/note/delete/78397/spam
Del: non-english -- https://master.php.net/note/delete/78397/non-english
Del: in docs -- https://master.php.net/note/delete/78397/in+docs
Del: other reasons-- https://master.php.net/note/delete/78397
Reject -- https://master.php.net/note/reject/78397
Search -- https://master.php.net/manage/user-notes.php