Login   Register  
PHP Classes
elePHPant
Icontem

Class: Simple Array

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Lacroix  >  Simple Array  >  Download .tar.gz .zip  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Simple Array
Base name: simple-array
Description: Manage arrays with keys of any type
Related classes:
Version: 1.0.0
PHP version: 5.3
License: GNU General Public License (GPL)
All time users: 270 users
All time rank: 5725
Week users: 8 users
Week rank: 442
Picture of Martin Lacroix
Author: Martin Lacroix <e-mail contact>
Packages: 4 Browse this author's classes Browse this author's classes
Country: France France - PHP jobs in France
Age: 35
All time rank: 185156 in France France
Week rank: 276 Up14 in France France Up
Innovation award
Innovation award
Nominee: 2x


  Detailed description  
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.

 

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Data types Modeling and manipulating data types View top rated classes

  Rate classes User ratings   Applications   Files Files  

  Innovation Award  
PHP Programming Innovation award nominee
January 2012
Nominee
Vote
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

  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
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 Example.php Example Short example
Plain text file SimpleArray.php Class Main class - With description

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