assert_closures.phpt 318 B

12345678910111213141516
  1. --TEST--
  2. assert() - basic - accept closures as callback.
  3. --INI--
  4. assert.active = 1
  5. assert.warning = 1
  6. assert.bail = 0
  7. assert.exception=0
  8. --FILE--
  9. <?php
  10. assert_options(ASSERT_CALLBACK, function () { echo "Hello World!\n"; });
  11. assert(0);
  12. ?>
  13. --EXPECTF--
  14. Hello World!
  15. Warning: assert(): assert(0) failed in %s on line %d