Universal Constructor Sighting a€oIn The Wilda€¯
Note: This article was originally published at Planet PHP
on 9 July 2010.
For those of you who don't know, a€ouniversal constructora€¯ is the name I give to PHP constructors that always and only take a single parameter. The parameter is an array of key-value pairs, which is then merged with a set of default keys and values. Finally, the array is unmarshalled, usually into object properties.
One [...]


