note 114892 added to migration56.new-features
| From: | ashnazg@php.net | Date: | Mon, 21 Apr 2014 15:07:24 +0000 |
| Subject: | note 114892 added to migration56.new-features | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199311@lists.php.net to get a copy of this message | ||
Note the order of operations in that exponentiation operator, as it was opposite of what my first
expectation was:
<?php
// what I had expected,
// evaluating left to right,
// since no parens were used to guide the order of operations
2 ** 3 ** 2 == 64; // (2 ** 3) ** 2 = 8 ** 2 = 64
// the given example,
// which appears to evaluate right to left
2 ** 3 ** 2 == 512; // 2 ** (3 ** 2) = 2 ** 9 = 512
?>
----
Server IP: 92.48.119.85
Probable Submitter: 65.49.79.95
----
Manual Page -- http://php.net/manual/en/migration56.new-features.php
Edit -- https://master.php.net/note/edit/114892
Del: integrated -- https://master.php.net/note/delete/114892/integrated
Del: useless -- https://master.php.net/note/delete/114892/useless
Del: bad code -- https://master.php.net/note/delete/114892/bad+code
Del: spam -- https://master.php.net/note/delete/114892/spam
Del: non-english -- https://master.php.net/note/delete/114892/non-english
Del: in docs -- https://master.php.net/note/delete/114892/in+docs
Del: other reasons-- https://master.php.net/note/delete/114892
Reject -- https://master.php.net/note/reject/114892
Search -- https://master.php.net/manage/user-notes.php