dev • api • cat • special

Special Methods

Special methods are methods declared in classes, whose name begins with an underscore character. They are called by the interpreter in some special situations.

There are eight special methods, and they are all optional.

_init Class initialization.
_exit Class clean-up.
_new Object instanciation.
_free Object release.
_next Object or class enumeration.
_get Array read operator.
_put Array write operator.
_call Using the object or the class as a method.
_unknown Calling an unknown method or property.

See also