Modulo¶
Modulo is the mathematical operation: it produces the remaining of the integer division of a number by another.
It also works with booleans and null, which are converted to integers. Other types are not allowed for modulo and yield a fatal error.
The operator for module is the percentage %. The decimal division operator is slash /.
<?php
$a = 25 % 4; // 1
?>
Related : Division, Multiplication, intdiv()