Mimicking Python Descriptors in PHP

So you’ve been working in Python for a year and then along comes a PHP gig that you just can’t pass up. All of a sudden you’re realizing just how much you miss some of the familiar Pythonisms you’ve come to rely on. One such feature that is lacking in PHP is the concept of descriptors. Fortunately, it’s possible to pretty closely simulate their behaviour in PHP with just a few special interfaces and classes.

Read more

January 15th 2010
6:55 pm

by:
0 Comments
,

Recent Tweets

Read more

Flickr

View Photostream

Last.Fm

Elsewhere