With PHP 8.1 and more, be carefull to the modulo "%"
Both argument must be some integer or a float without floating part.
Bad Example:
<?php
12.5 % 4.5
?>
You will enjoy a :
Deprecated: Implicit conversion from float 12.5 to int loses precision in ... filename
Deprecated: Implicit conversion from float 5.4 to int loses precision in ... filename
A fix, cast your int :
<?php
(int) 12.5 % (int)4.5