PHP Classes

Array to Object converter: Turn any array into an object

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-10-20 (1 year ago) RSS 2.0 feedStarStar 33%Total: 1,210 This week: 1All time: 2,989 This week: 1,125Up
Version License PHP version Categories  
toobj 1.0.4GNU General Publi...5.0PHP 5, Data types
Description Author  

This class can be used to turn any array into an object.

It takes an array and assigns the variables of the class with the values of the array entries with the same name.

Array entries with array values are also converted to objects recursively.

Innovation Award  
PHP Programming Innovation award nominee
April 2009
Number 2

Prize: One copy of VS.PHP
Since PHP 5, classes can be used to access objects as if they were arrays.

This class takes advantage of that possibility to quickly initialize object variables from data taken from associative arrays.

Manuel Lemos
Picture of Sebastian Potasiak
  Performance   Level  
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: Poland Poland
Age: ???
All time rank: 62517 in Poland Poland
Week rank: 461 Up14 in Poland Poland Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file toobj.php Class Class file
Accessible without login Plain text file example.php Example Example of using class

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,210All time:2,989
 This week:1This week:1,125Up
User Ratings User Comments (1)  
 All time
This class is pretty useless.
6 years ago (iltar van der berg)