PHP Classes
elePHPant
Icontem

Simple Array: Manage arrays with keys of any type

Recommend this page to a friend!
  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 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 484 All time: 5,629 This week: 919Up
Version License PHP version Categories
simple-array 1.0.0GNU General Publi...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
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:484
This week:0
All time:5,629
This week:919Up