Login   Register  
PHP Classes
elePHPant
Icontem

Simple Array: Manage arrays with keys of any type

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-01-16 (2 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 483 All time: 5,366 This week: 1,486Up
Version License PHP version Categories  
simple-array 1.0.0GNU General Public Lice...5.3PHP 5, Data types
Description Author  

This class can manage arrays with keys of any type.

It provides interfaces to access arrays with regular PHP array functions but internally it stores array keys and entry values in separate arrays, so it avoids PHP automatic casting of array keys to integer or string values.

The class can find entries with given key values by searching the internal keys array, so entries with keys of different types represent different array entries.

Innovation Award  
PHP Programming Innovation award nominee
January 2012
Number 3


Prize: One copy of the Zend Studio
In PHP arrays may have keys of either integer or string types. If you use values of other types as keys, PHP will cast the type of key values.

This class provides a workaround to this limitation by implementing an array interface that internally uses a separate array for keys and another for values, so keys can be of any type.

Manuel Lemos
Picture of Martin Lacroix
Name: Martin Lacroix <contact>
Classes: 4 packages by
Country: France France
Age: 38
All time rank: 169150 in France France
Week rank: 564 Up18 in France France Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file Example.php Example Short example
Plain text file SimpleArray.php Class Main class - With description

 Version Control Unique User Downloads Download Rankings  
 0%Total:483All time:5,366
 This week:0This week:1,486Up