1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/entry_block_with_predecessors.phpt
Máté Kocsis 36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00

34 lines
460 B
PHP

--TEST--
For SSA form the entry block should have no predecessors
--FILE--
<?php
function test() {
while (true) {
var_dump($a + 1);
$a = 1;
if (@$i++) {
break;
}
}
}
function test2() {
while (true) {
$a = 42;
if (@$i++ > 1) {
break;
}
$a = new stdClass;
}
}
test();
test2();
?>
--EXPECTF--
Warning: Undefined variable $a in %s on line %d
int(1)
int(2)