note 36929 added to language.operators.bitwise

From: Date: Mon, 27 Oct 2003 19:14:54 +0000
Subject: note 36929 added to language.operators.bitwise
Groups: php.notes 
Request: Send a blank email to php-notes+get-59388@lists.php.net to get a copy of this message
Well, every programmer already knows this but for anyone new to the fun here's some quick clean code to determine if a number is odd or even. function oddeven($x){ if($x & 1) return "odd"; else return "even"; } ---- Manual Page -- http://www.php.net/manual/en/language.operators.bitwise.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36929 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36929&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36929&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59388) next »