xref: /PHP-8.3/ext/opcache/tests/jit/assign_048.phpt (revision 66306030)
1--TEST--
2JIT ASSIGN: incorrect type store elimination
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9opcache.optimization_level=0x7FFEBFFF
10--FILE--
11<?php
12function test(){
13    $j = 0;
14    for($i=0; $i<10; $i++) {
15        +$b = +$b = unserialize('');
16        $y[] = 4;
17        $a + ~$b = $j++;
18     }
19}
20test();
21?>
22DONE
23--EXPECTF--
24Warning: Undefined variable $a in %sassign_048.php on line 7
25
26Warning: Undefined variable $a in %sassign_048.php on line 7
27
28Warning: Undefined variable $a in %sassign_048.php on line 7
29
30Warning: Undefined variable $a in %sassign_048.php on line 7
31
32Warning: Undefined variable $a in %sassign_048.php on line 7
33
34Warning: Undefined variable $a in %sassign_048.php on line 7
35
36Warning: Undefined variable $a in %sassign_048.php on line 7
37
38Warning: Undefined variable $a in %sassign_048.php on line 7
39
40Warning: Undefined variable $a in %sassign_048.php on line 7
41
42Warning: Undefined variable $a in %sassign_048.php on line 7
43DONE
44