summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug77058.phpt
blob: a1962b7adeeec0af7191f31295606984d61352e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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