PHP Classes

Array to Object converter: Turn any array into an object

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 33%Total: 1,221 This week: 1All time: 3,122 This week: 560Up
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: United States United States
Age: ???
All time rank: 65986 in United States United States
Week rank: 416 Up46 in United States United States 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,221
This week:1
All time:3,122
This week:560Up
User Ratings User Comments (1)
 All time
Utility:37%StarStar
Consistency:79%StarStarStarStar
Documentation:-
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:33%StarStar
Rank:4171
 
This class is pretty useless.
14 years ago (iltar van der berg)
17%Star