- spl_autoload_register: documentation ( source)
- var_dump: documentation ( source)
<?php
spl_autoload_register(function ($name) {
echo "AUTOLOAD :: ";
var_dump($name);
});
class MyClass {
use MyTrait; // Let's try to use a trait that is not declared in this file
}
$obj = new MyClass();
$obj->plop();