You might have seen my earlier article related to Magic Constants in PHP. Those are constants already declared by the core PHP which we can not declare in our code.
So same as these constants we have set of Interface also which are already declared by the PHP. If you are not sure what is Interface in PHP, then I would suggest to read this article related to Interface In PHP.
So I hope that you are much clear about interface in PHP after reading my article. So Today’s article is about to introduce the predefined interfaces in PHP. In this article I will list out those interfaces and later we will have full detailed articles for each of them.
So Here is the list of those Interfaces:
Here now we will have brief intorduction of each of the interfaces.
Interface to detect if a class is traversable using foreach.
This interface has no methods, its only purpose is to be the base interface for all traversable classes.
Interface for external iterators or objects that can be iterated themselves internally.
This interface provides below methods:
Interface to create an external Iterator.
This interface can be used if you want to create an external Iterator.
It has below methods:
This interface provides a way to access objects as an arrays.
It has below methods defined:
This interface is used for customized serializing. Classes that implement this interface no longer support __sleep() and __wakeup().
Class used to represent anonymous functions. Anonymous functions, implemented in PHP 5.3. This class also has an __invoke method
So here is the quick introduction all predefined interfaces, Later we will have full detailed article for each of the features. Subscribe to our RSS Feed by Email if you don’t want to miss those articles.
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash