(PHP 7, PHP 8)
Un ArithmeticError es lanzado cuando ocurre un error durante la realización de operaciones matemáticas. Estos errores incluyen el intento de realizar un desplazamiento de bit mediante una cantidad negativa, y cualquier llamada a intdiv() que resulte en un valor fuera de los límites posibles de un int .
the first example shifted by the positive number and the result is 4, but the second example shifted by the negative number and the result is ArithmeticError(this example is the same for left shift)
<?php
$shif =1;
$number = 8;
$result = $number >> $shif;
echo $result; //// 1000 >> 01000 = 4
$shif =-1;
$number = 8;
$result = $number >> $shif;
////result is ArithmeticError
?>