inference_infinite_loop.phpt 261 B

1234567891011121314151617
  1. --TEST--
  2. Type inference should not result in infinite loop
  3. --FILE--
  4. <?php
  5. function test() {
  6. $b = false;
  7. do {
  8. $a = $a + PHP_INT_MAX + 2;
  9. $a = 0;
  10. } while ($b);
  11. }
  12. test();
  13. ?>
  14. --EXPECTF--
  15. Warning: Undefined variable $a in %s on line %d