In a new series from Zend this morning, they are going to begin spotlights on different features of the upcoming PHP5 release. Today, their first in this series is one from Sebastian Bergmann about Interceptors in PHP5.
This piece, Introduction to Interceptors I: Implementing Delegation, talks about the handy interception ability that PHP5 will have. For those that are unsure what this means: When a class declares a method with _call($methodName, $parameters) as its signature, this method will be automatically called by the PHP 5 interpreter when method is called on an object of the class that is not declared by the class. Basically, it's a failsafe - it gives you a default function to call when there is no such function that exists in that object. Pretty cool, huh? No more silly PHP error messages about undefined method calls - all hail custom error messages!
I'm glad that Zend is getting into some of these new features in detail before the release. That will give all of us that don't have the time to search through every single doc out there for the differences a fighting chance...




