The modulo % does not work on Floats, use fmod() https://www.php.net/manual/en/function.fmod.phpphp > echo (1.1 % 1);0php > echo fmod(1.1, 1);0.1Could be a discussion on if it should, but at least at the moment it doesn't.https://en.wikipedia.org/wiki/Modulohas a list of languages that do/don't support modulo on floats