php-src/Zend/tests/methods-on-non-objects-call-user-func.phpt
2019-03-11 11:32:20 +01:00

13 lines
392 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() expects parameter 1 to be a valid callback, first array member is not a valid class name or object