PHP object overloading
24th July 2002
I’m not sure how this one snuck under the radar, but PHP now supports object overloading (as of version 4.2.0). It can be implemented by creating class methods __set()
, __get()
and __call()
and then applying the new overload() function to the class name. The documentation claims that __call()
is not yet supported but is apparently out of date. Standard warnings about the experimental and unfrozen nature of the extension apply.
More recent articles
- My AI/LLM predictions for the next 1, 3 and 6 years, for Oxide and Friends - 10th January 2025
- Weeknotes: Starting 2025 a little slow - 4th January 2025
- I still don't think companies serve you ads based on spying through your microphone - 2nd January 2025