2 Error when registering autoload with non-static autoload already on SPL stack
5 if (!function_exists('spl_autoload_register')) {
6 echo "skip - spl_autoload_register() not available";
12 public function autoload($class) {
13 echo "Autoloading... $class" . PHP_EOL;
14 eval("class $class {}");
18 $obj = new NotStatic();
19 spl_autoload_register(array($obj, 'autoload'));
22 require '../library/HTMLPurifier.auto.php';
23 } catch (Exception $e) {
24 echo 'Caught error gracefully';
25 assert('strpos($e->getMessage(), "44144") !== false');
29 Caught error gracefully