mirror of
https://github.com/php/php-src.git
synced 2025-01-25 05:04:20 +08:00
75bc3446f8
All these tests are meant to run with OPcache available, and some will even fail inevitably without it, so we add OPcache as SKIPIF requirement.
23 lines
371 B
PHP
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--
|
|
Notice: Undefined variable: x in %s on line %d
|
|
'2' is expected to be 2
|