PHP Classes
elePHPant
Icontem

Persistent Array: Access flat file databases like arrays

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2008-03-04 (11 years ago) RSS 2.0 feedNot enough user ratingsTotal: 862 All time: 3,992 This week: 458Up
Version License PHP version Categories
parray 1.0BSD License5.0PHP 5, Databases, Data types
Description Author

This class can be used to access flat file databases like arrays.

The class extends the SPL ArrayObject class to be able to retrieve, add, update and delete entries in flat file database files using the DBM extension.

It also provides an iterator class to be able to traverse the entries in a DBM file using the regular array access functions.

Innovation Award
PHP Programming Innovation award nominee
March 2008
Number 6


Prize: One subscription to the PDF edition of the magazine by PHP Architect
Arrays are a very popular data type used in PHP to store a variable number of information items.

If you want to store information of arrays in a file or database so you can retrieve later, you can serialize the array and store it as a single data chunk.

However, that is not a very efficient solution. If the array is large, it may take too much time to store and retrieve changes or look up for elements.

This package takes advantage of the PHP 5 array iterator objects and implements a wrapper that stores and retrieve array elements in a flat file database managed by the DBM API.

This way the array can be stored persistently in files and its elements can be accessed very quickly.

Manuel Lemos
  Performance   Level  
Name: Cesar D. Rodas <contact>
Classes: 39 packages by
Country: Paraguay Paraguay
Innovation award
Innovation award
Nominee: 25x

Winner: 5x

  Files folder image Files  
File Role Description
Plain text file parray.php Class Main class
Accessible without login Plain text file test.php Test Testing

 Version Control Unique User Downloads Download Rankings  
 0%
Total:862
This week:0
All time:3,992
This week:458Up