BIT operations in PHP (a simple example)

  • Generally best avoided in web applications, as all the database engines I'm familiar with can't use indexes for bitwise operations.

  • An interesting way of dealing with flags depending on the kind of app you are developing, I wouldn't use that technique often.