assert04.phpt 539 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. misc assert() tests tests
  3. --INI--
  4. assert.active = 1
  5. assert.warning = 1
  6. assert.callback =
  7. assert.bail = 0
  8. assert.exception=0
  9. --FILE--
  10. <?php
  11. /* Assert not active */
  12. assert_options(ASSERT_ACTIVE, 0);
  13. assert(1);
  14. /* Wrong parameter count in assert */
  15. assert_options(ASSERT_ACTIVE, 1);
  16. /* Assert false */
  17. assert(0);
  18. /* Assert false and bail*/
  19. assert_options(ASSERT_BAIL, 1);
  20. assert(0);
  21. echo "not reached\n";
  22. ?>
  23. --EXPECTF--
  24. Warning: assert(): assert(0) failed in %s on line %d
  25. Warning: assert(): assert(0) failed in %s on line %d