'we use spl_autoload_register function in the place of __autoload function but spl function don't return the value of creating instance name
function myAutoload($class)
{
echo $class;die;
}
spl_autoload_register('myAutoload');
$obj = new clasic_card();
here the above function myAutoload have parameter has class which value is must be clasic_card but the value which is echo is (WP_Site_Health) i want to require a file when we create an instance of a class. plzz help me
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
