xref: /PHP-8.4/ext/opcache/tests/jit/gh16770.phpt (revision cbb3b937)
1--TEST--
2GH-16770 (Tracing JIT type mismatch when returning UNDEF)
3--INI--
4opcache.jit=1254
5opcache.jit_hot_loop=1
6opcache.jit_buffer_size=32M
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11function ret_undef($k) {
12    return $undefined;
13}
14for ($i = 0; $i < 10; $i++) {
15    $output = ret_undef($i);
16}
17var_dump($output);
18?>
19--EXPECTF--
20Warning: Undefined variable $undefined in %s on line %d
21
22Warning: Undefined variable $undefined in %s on line %d
23
24Warning: Undefined variable $undefined in %s on line %d
25
26Warning: Undefined variable $undefined in %s on line %d
27
28Warning: Undefined variable $undefined in %s on line %d
29
30Warning: Undefined variable $undefined in %s on line %d
31
32Warning: Undefined variable $undefined in %s on line %d
33
34Warning: Undefined variable $undefined in %s on line %d
35
36Warning: Undefined variable $undefined in %s on line %d
37
38Warning: Undefined variable $undefined in %s on line %d
39NULL
40