bug31720.phpt 411 B

1234567891011121314
  1. --TEST--
  2. Bug #31720 (Invalid object callbacks not caught in array_walk())
  3. --FILE--
  4. <?php
  5. $array = array('at least one element');
  6. array_walk($array, array($nonesuchvar,'show'));
  7. ?>
  8. ===DONE===
  9. --EXPECTF--
  10. Notice: Undefined variable: nonesuchvar in %s on line %d
  11. Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
  12. ===DONE===