There are a number of methods that can be implemented in a class for the purpose of being called internally by the PHP engine. These are known as magic methods and they are easy to recognize because they all start with two underscores. Table 22-1 lists the magic methods that have been discussed so far.
Table 22-1. Magic Methods
Called when creating a new instance.
Called when object has no references left.
Called when invoking inaccessible methods in an object context.
Called when invoking inaccessible ...