Looks like the function signature given in description is wrong. Actually it can take a string as a first parameter in the case if $allow_string is set to true.
It took some time to find out how the last parameter should be used. Please consider the following example
<?php
class Foo{}
spl_autoload_register(
function($classname){
printf('autoload has been triggered for %s%s', $classname, PHP_EOL);
}
);
var_dump(is_a('UndefinedClassName', Foo::class, true));
?>