xref: /php-src/ext/opcache/tests/jit/bw_not_002.phpt (revision c16ad918)
1--TEST--
2JIT BW_NOT: 002 Exception handling
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--FILE--
9<?php
10function test() {
11	$j = 0;
12    for ($i = 0; $i < 10; $i++) {
13        $a = ~$j - $a = $j + $j = !$j = $j++;
14    }
15}
16test();
17?>
18--EXPECTF--
19Fatal error: Uncaught TypeError: Cannot perform bitwise not on true in %sbw_not_002.php:5
20Stack trace:
21#0 %sbw_not_002.php(8): test()
22#1 {main}
23  thrown in %sbw_not_002.php on line 5
24