<?php
namespace Upload;
class FileFactory {
static public function autoload($name) {
print '[['. $name .']]';
}
}
spl_autoload_register(__NAMESPACE__ .'\Foo::Upload'); // As of PHP 5.3.0
new InexistentClass;
Fatal error: Uncaught TypeError: spl_autoload_register(): Argument #1 ($callback) must be a valid callback or null, class "Upload\Foo" not found in /in/Z6EUK:11
Stack trace:
#0 /in/Z6EUK(11): spl_autoload_register('Upload\\Foo::Upl...')
#1 {main}
thrown in /in/Z6EUK on line 11
Process exited with code 255.
Output for 8.0.0 - 8.0.30
Fatal error: Uncaught TypeError: spl_autoload_register(): Argument #1 ($callback) must be a valid callback, class "Upload\Foo" not found in /in/Z6EUK:11
Stack trace:
#0 /in/Z6EUK(11): spl_autoload_register('Upload\\Foo::Upl...')
#1 {main}
thrown in /in/Z6EUK on line 11
Process exited with code 255.
Fatal error: Uncaught LogicException: Function 'Upload\Foo::Upload' not found (class 'Upload\Foo' not found) in /in/Z6EUK:11
Stack trace:
#0 /in/Z6EUK(11): spl_autoload_register('Upload\\Foo::Upl...')
#1 {main}
thrown in /in/Z6EUK on line 11
Process exited with code 255.
Fatal error: Uncaught exception 'LogicException' with message 'Function 'Upload\Foo::Upload' not found (class 'Upload\Foo' not found)' in /in/Z6EUK:11
Stack trace:
#0 /in/Z6EUK(11): spl_autoload_register('Upload\\Foo::Upl...')
#1 {main}
thrown in /in/Z6EUK on line 11
Process exited with code 255.
Fatal error: Uncaught exception 'LogicException' with message 'Function 'Upload\Foo::Upload' not found (class 'Upload\Foo' not found)' in /in/Z6EUK:11
Stack trace:
#0 /in/Z6EUK(11): spl_autoload_register('Upload\Foo::Upl...')
#1 {main}
thrown in /in/Z6EUK on line 11
Process exited with code 255.