1--TEST--
2JIT Shift Left: 002
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9--EXTENSIONS--
10opcache
11--FILE--
12<?php
13function shl0(int $a) {
14    return $a << 0;
15}
16function shl1(int $a) {
17    return $a << 1;
18}
19function shl2(int $a) {
20    return $a << 2;
21}
22function shl64(int $a) {
23    return $a << 64;
24}
25function shlNEG(int $a) {
26    return $a << -1;
27}
28var_dump(shl0(1));
29var_dump(shl1(1));
30var_dump(shl2(1));
31var_dump(shl2(-1));
32try {
33    var_dump(shl64(1));
34} catch (Throwable $e) {
35    echo "Exception " . $e->getMessage() . "\n";
36}
37try {
38    var_dump(shlNEG(1));
39} catch (Throwable $e) {
40    echo "Exception (" . get_class($e) . "): " . $e->getMessage() . "\n";
41}
42?>
43--EXPECT--
44int(1)
45int(2)
46int(4)
47int(-4)
48int(0)
49Exception (ArithmeticError): Bit shift by negative number
50