Elements of this Web site are protected by trade dress and other laws and may not be copied or imitated in whole or in part. You can contact the webmaster at . For more information on the PHP Development Team and the PHP project, please see . Features Chapter 13. A class is a collection of variables and functions working with these variables.
Classes are types, that is, they are blueprints for actual variables.
You have to create a variable of the desired type with the new operator. Classes can be extensions of other classes. The extended or derived class has all variables and functions of the base class and what you add in the extended definition. This is done using the extends keyword. Multiple inheritance is not supported.