methods-on-non-objects-call-user-func.phpt 399 B

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