ArithmeticError
(PHP 7, PHP 8)
类摘要
/* 继承的属性 */
/* 继承的方法 */
}
+添加备注
用户贡献的备注 1 note
nima dot shirinzadeh at gmail dot com ¶
4 years ago
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
?>
备份地址:http://www.lvesu.com/blog/php/class.arithmeticerror.php