Regarding the operation of division with remainder (%) - it differs from the one accepted in mathematics, since it is looking for "refusal" and not "remainder" - a feature of the idiv implementation in 8086
    还记得学校里学到的基本数学知识吗?就和它们一样。
| 例子 | 名称 | 结果 | 
|---|---|---|
| +$a | 标识 | 根据情况将 $a 转化为 int 或 float。 | 
| -$a | 取反 | $a 的负值。 | 
| $a + $b | 加法 | $a 和 $b 的和。 | 
| $a - $b | 减法 | $a 和 $b 的差。 | 
| $a * $b | 乘法 | $a 和 $b 的积。 | 
| $a / $b | 除法 | $a 除以 $b 的商。 | 
| $a % $b | 取模 | $a 除以 $b 的余数。 | 
| $a ** $b | 求幂 | $a 的 $b次方的值。 | 
除法运算符总是返回浮点数。只有在下列情况例外:两个操作数都是整数(或字符串转换成的整数)并且正好能整除,这时它返回一个整数。 整数除法可参考 intdiv()。
取模运算符的操作数在运算之前都会转换成整数(除去小数部分)。 浮点数取模可参考 fmod()。
    取模运算符 % 的结果和被除数的符号(正负号)相同。即
    $a % $b 的结果和 $a 的符号相同。例如:
    
<?php
echo (5 % 3)."\n";           // prints 2
echo (5 % -3)."\n";          // prints 2
echo (-5 % 3)."\n";          // prints -2
echo (-5 % -3)."\n";         // prints -2
?>
Regarding the operation of division with remainder (%) - it differs from the one accepted in mathematics, since it is looking for "refusal" and not "remainder" - a feature of the idiv implementation in 8086