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

23 lines
371 B
PHP

--TEST--
Bug #77058: Type inference in opcache causes side effects
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function myfunc(){
$Nr = 0;
while(1){
$x--;
$x++;
if( ++ $Nr >= 2 ) break;
}
echo "'$Nr' is expected to be 2", PHP_EOL;
}
myfunc();
?>
--EXPECTF--
Warning: Undefined variable $x in %s on line %d
'2' is expected to be 2