1--TEST--
2JIT Shift Left: 001
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 shl(int $a, int $b) {
14    return $a << $b;
15}
16var_dump(shl(1, 0));
17var_dump(shl(1, 1));
18var_dump(shl(1, 2));
19var_dump(shl(-1, 2));
20try {
21    var_dump(shl(1, 64));
22} catch (Throwable $e) {
23    echo "Exception " . $e->getMessage() . "\n";
24}
25try {
26    var_dump(shl(1, -1));
27} catch (Throwable $e) {
28    echo "Exception (" . get_class($e) . "): " . $e->getMessage() . "\n";
29}
30?>
31--EXPECT--
32int(1)
33int(2)
34int(4)
35int(-4)
36int(0)
37Exception (ArithmeticError): Bit shift by negative number
38