Universal Constructor Sighting “In The Wild” - Paul M. Jones

You can't request more than 20 challenges without solving them. Your previous challenges were flushed.
Courtesy Planet PHP  Fri, 07/09/2010 - 07:30

For those of you who don’t know, “universal constructor” 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 [...]


 

More related items

Alvaro Videla's Blog: Erlang as a Fast Key Value...
Alvaro Videla has submitted a new post he's written up combining PHP and Erlang yet again, but this time he's using it to just store key/value pairs rather than for session data. In this...

Include-Based vs Class-Based Architecture - Paul M....
This is a topic I describe at length in my Organizing talk, but I would like to give the idea a home on my blog for easy reference. Include-Based Typical PHP uses what I call an include-based...

“Most people? Not nerds.” - Paul M. Jones
OpenID has never really caught on in a major way. I use it pretty much only on StackOverflow and 37signals products, and I really like it. Regular (non-web-building) users find it puzzling,...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com