diff --git a/language/oop5/autoload.xml b/language/oop5/autoload.xml index dad7166c30..a94169f902 100644 --- a/language/oop5/autoload.xml +++ b/language/oop5/autoload.xml @@ -1,5 +1,5 @@ - + Autoloading Objects @@ -10,11 +10,18 @@ In PHP 5, this is no longer necessary. You may define an - &link.autoload; function which is automatically + __autoload function which is automatically called in case you are trying to use a class which hasn't been defined yet. By calling this function the scripting engine is given a last chance to load the class before PHP fails with an error. + + + Exceptions thrown in __autoload function cannot be catched in the + catch block and result in fatal + error. + + Autoload example