Today I was tipped off to a certain quirk of PHP, specifically with how it handles Array resources. Every programmer knows, (or should know), the differences between creating a new copy of a variable and making a new reference to the same variable. In PHP, as far as I’ve known, you never access memory directly.

As with any profession, programming is a split of skill and quirks. Quirks come in many forms and can be quite useful or a bane. In JavaScript, for instance, you can reference a function as an object, which itself can be referenced as a hash. Thusly, window.foo[bar](baz) is perfectly valid(!). In PHP, an Array can

Coming out of high school, it was stressed that good practice makes good composition. One of these pillars of thought was code purity. Purity in the sense that each method should do as it’s advertised without causing side effects. It’s not much different than Design By Contract, (DBC) – a coding technique promoted in The

© 2011 Advent Digerati Suffusion theme by Sayontan Sinha