PHP 8.5.0 Beta 1 available for testing

Voting

: seven minus four?
(Example: nine)

The Note You're Voting On

dkrupyanskiy[at]gmail
7 years ago
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));

?>

<< Back to user notes page

To Top