Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

From: Date: Sun, 17 Jun 2007 19:48:32 +0000
Subject: Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-257234@lists.php.net to get a copy of this message
admittedly i had to read up quickly on the usage of a *binary pattern*where each bit in said *pattern* is used to represent the state of some boolean variable. wikipedia sufficed <http://en.wikipedia.org/wiki/Bitwise_operation#OR> this makes much more sense to me now; as ive seen this technique before but never taken in a formal explanation of it. i hesitate now to suggest what i would do, which would be to define an object encapsulating an array of boolean variables and providing acccessors and mutators for each respective value it represented. presumably the internal implementation might be enhanced using the bitwise OR mechanism discussed in this thread, in which case we would still like to know how to best handle the implementation component of said object. but i do very much love my objects :> nice thread, -nathan


« previous php.general (#257234) next »