About Overloading…

I was playing around with PHP’s overload operators and wondered what would happen if you overloaded both __call() and __get(). Turns out PHP does the right thing (for once). If you use the function call syntax on the magic property, the __cal()l overload is used and if you don’t PHP uses the __get()/__set() overload.

This could be used to create some funky black magic code…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: