xref: /PHP-8.2/ext/opcache/tests/jit/mod_007.phpt (revision 25ad171f)
1--TEST--
2JIT MOD: 007
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9--FILE--
10<?php
11function test($a) {
12    for(;$a < -2;) {
13      $n % $n = $a + $a;
14    }
15}
16test(null);
17?>
18--EXPECTF--
19Fatal error: Uncaught DivisionByZeroError: Modulo by zero in %smod_007.php:4
20Stack trace:
21#0 %smod_007.php(7): test(NULL)
22#1 {main}
23  thrown in %smod_007.php on line 4