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

123456789101112
  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. var_dump(call_user_func([$comparator, 'compare'], 1, 2));
  7. echo "Alive\n";
  8. ?>
  9. --EXPECTF--
  10. Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
  11. NULL
  12. Alive