assert_error.phpt 775 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. assert() - error - give assert nonsense string with quiet_eval on then off
  3. --INI--
  4. assert.active = 1
  5. assert.warning = 1
  6. assert.callback = f1
  7. assert.bail = 0
  8. assert.quiet_eval = 0
  9. --FILE--
  10. <?php
  11. function f1()
  12. {
  13. echo "f1 called\n";
  14. }
  15. $sa = "threemeninaboat";
  16. var_dump($r2=assert($sa));
  17. var_dump($ra0 = assert_options(ASSERT_QUIET_EVAL, 1));
  18. var_dump($r2=assert($sa));
  19. --EXPECTF--
  20. Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
  21. Warning: Use of undefined constant threemeninaboat - assumed 'threemeninaboat' (this will throw an Error in a future version of PHP) in %s(9) : assert code on line 1
  22. bool(true)
  23. int(0)
  24. Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
  25. bool(true)