note 115864 added to internals2.opcodes.mod
| From: | doug at unlikelysource dot com | Date: | Sun, 05 Oct 2014 23:30:10 +0000 |
| Subject: | note 115864 added to internals2.opcodes.mod | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200591@lists.php.net to get a copy of this message | ||
To determine odd or even it's faster and more efficient to use the bitwise & operator:
$a = 3;
if ($a & 1) {
echo 'odd';
} else {
echo 'even';
}
// returns 'odd'
----
Server IP: 72.52.91.14
Probable Submitter: 107.206.157.103
----
Manual Page -- http://php.net/manual/en/internals2.opcodes.mod.php
Edit -- https://master.php.net/note/edit/115864
Del: integrated -- https://master.php.net/note/delete/115864/integrated
Del: useless -- https://master.php.net/note/delete/115864/useless
Del: bad code -- https://master.php.net/note/delete/115864/bad+code
Del: spam -- https://master.php.net/note/delete/115864/spam
Del: non-english -- https://master.php.net/note/delete/115864/non-english
Del: in docs -- https://master.php.net/note/delete/115864/in+docs
Del: other reasons-- https://master.php.net/note/delete/115864
Reject -- https://master.php.net/note/reject/115864
Search -- https://master.php.net/manage/user-notes.php