1--TEST--
2JIT Shift Left: 001
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function shl(int $a, int $b) {
13    return $a << $b;
14}
15var_dump(shl(1, 0));
16var_dump(shl(1, 1));
17var_dump(shl(1, 2));
18var_dump(shl(-1, 2));
19try {
20    var_dump(shl(1, 64));
21} catch (Throwable $e) {
22    echo "Exception " . $e->getMessage() . "\n";
23}
24try {
25    var_dump(shl(1, -1));
26} catch (Throwable $e) {
27    echo "Exception (" . get_class($e) . "): " . $e->getMessage() . "\n";
28}
29?>
30--EXPECT--
31int(1)
32int(2)
33int(4)
34int(-4)
35int(0)
36Exception (ArithmeticError): Bit shift by negative number
37