diff options
Diffstat (limited to 'Zend/tests/inference_infinite_loop.phpt')
-rw-r--r-- | Zend/tests/inference_infinite_loop.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/inference_infinite_loop.phpt b/Zend/tests/inference_infinite_loop.phpt new file mode 100644 index 0000000000..1e94ea8040 --- /dev/null +++ b/Zend/tests/inference_infinite_loop.phpt @@ -0,0 +1,17 @@ +--TEST-- +Type inference should not result in infinite loop +--FILE-- +<?php + +function test() { + $b = false; + do { + $a = $a + PHP_INT_MAX + 2; + $a = 0; + } while ($b); +} +test(); + +?> +--EXPECTF-- +Notice: Undefined variable: a in %s on line %d |