note 116276 deleted from function.autoload by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:25:54 +0000 |
| Subject: | note 116276 deleted from function.autoload by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218050@lists.php.net to get a copy of this message | ||
Note Submitter: Jose G
----
You should use include() or require() inside __autoload()
instead of include_once() or require_once().
If you reach __autoload(), then you know the file with the class definition has not been loaded yet.
include() and require() are more efficient than include_once() and require_once().