note 125928 deleted from function.autoload by crell
| From: | crell@php.net | Date: | Mon, 04 Apr 2022 16:25:28 +0000 |
| Subject: | note 125928 deleted from function.autoload by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218046@lists.php.net to get a copy of this message | ||
Note Submitter: sham dot hrm at gmail dot com
----
We you create an object of the class and If the PHP engine doesn't find the class file included
in the script then __autoload() magic method will automatically trigger.
You can implement it as given below example:
<?PHP
function __autoload($ClassName)
{
include($ClassName.".php");
}
$obj = new Base;
?>