note 75832 deleted from language.oop5.autoload by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:06:37 +0000 |
| Subject: | note 75832 deleted from language.oop5.autoload by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218014@lists.php.net to get a copy of this message | ||
Note Submitter: peter dot gooman at gmail dot com
----
Before you start using __autload, remember that it holds no scope/namespace. This means that if you
are depending on third party applications and they have an autoload function defined and so do you,
your application will error.
To remedy this, everyone should look at the spl_autoload functions, eg: spl_autoload_register. This
function allows more than one custom functions to be called through the default spl_autoload
(default __autoload) handler.