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