note 103510 deleted from language.operators.arithmetic by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 15:08:10 +0000 |
| Subject: | note 103510 deleted from language.operators.arithmetic by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189826@lists.php.net to get a copy of this message | ||
Note Submitter: xadart at ymail dot com
----
When using %, the dividend is always the result if it's lower than the divisor.
<?php
# dividend % divisor
$x = (123 % 500); # 123
$y = (7 % 8); # 7
?>
This is because e.g. 123 / 500 = 0 and 123 is left over.