Login   Register  
PHP Classes
elePHPant
Icontem

Bitmask Magic: Generate bitmasks for storing options.

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Timm Simpkins
Name: Timm Simpkins <contact>
Classes: 1 package by
Country: United States United States
Age: 40
All time rank: 2243283 in United States United States
Week rank: 1080 Up113 in United States United States Up


  Detailed description   Download Download .zip .tar.gz  
This class is designed to create bitmasks, which are very commonly used to store lists of true or false values as a single integer.

The class can manpulate bitmasks that are not limited to 32 bits. It does not need the PHP gmp extension to provide arbitrary bit length support.

This absence of limits may encourage the storage of more complex data than merely true or false lists for those that are creative enough to figure it out.

Although PHP programmers commonly rely on databases to do much of the grunt work that is most commonly done by bitmasks in other types of programming, there is nothing better for tracking things such as user permissions, product options, and I have even used them to trace complex data structures.

Features:

- Convert arrays of booleans to bitmasks

- Convert bitmasks to booleans

- Convert bitmasks to arrays of booleans

- Store virtually unlimited bit depth bitmasks in string form

- Query individual bits to see if they are set

- Enter an associative array, manipulate bits and return the array in either the full array or only the values that are set

  Classes of Timm Simpkins  >  Bitmask Magic  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Bitmask Magic
Base name: bitmask
Description: Generate bitmasks for storing options.
Version: -
PHP version: -
License: Public Domain
All time users: 909 users
All time rank: 3622
Week users: 1 user
Week rank: 1397 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image Math Math related classes. View top rated classes


  User ratings  
Not enough user ratings

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file bitmask.class.php Class bitmask class
Accessible without login Plain text file bitmask_example.php Example Example file for bitmask class

Download Download all files: bitmask.tar.gz bitmask.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.