This post originated from an RSS feed registered with Python Buzz
by Phillip Pearson.
Original Post: PHP hackery: quick and dirty anonmyous objects
Feed Title: Second p0st
Feed URL: http://www.myelin.co.nz/post/rss.xml
Feed Description: Tech notes and web hackery from the guy that brought you bzero, Python Community Server, the Blogging Ecosystem and the Internet Topic Exchange
Here's an awesome trick: you can cast arrays to objects in PHP then access them like objects. The brilliant part about it is that it appears to make them act like objects, i.e. $b = $a makes $a and $b point to the same object (like pretty much every other dynamic language) rather than copying $a.