php-src/Zend/tests/methods-on-non-objects-call-user-func.phpt
Nikita Popov 840e441d2d Fix parameter name in call_user_func() error message
This parameter name has been changed to $callback.
2021-07-29 12:48:25 +02:00

14 lines
399 B
PHP

--TEST--
call_user_func() in combination with "Call to a member function method() on a non-object"
--FILE--
<?php
$comparator = null;
try {
var_dump(call_user_func([$comparator, 'compare'], 1, 2));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
call_user_func(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object