2 ms·
I googled to see whether this was creativeness or just copying stuff from the net, and came across http://www.php.net/manual/en/language.operators.arithmetic.ph
by Someone 14y ago
I googled to see whether this was creativeness or just copying stuff from the net, and came across http://www.php.net/manual/en/language.operators.arithmetic.php http://www.php.net/manual/en/language.operators.arithmetic.p.... It states:
"Operands of modulus are converted to integers (by stripping the decimal part) before processing."
=> 4.5 % 1.5 is zero, as is 4.6 % 1.9. So, in the world of PHP, there may be logic in that strpos approach. As far as I can tell, it certainly isn't much worse than http://www.webdeveloper.com/forum/showthread.php?76114-Work-out-if-int-is-a-multiple-of-3 http://www.webdeveloper.com/forum/showthread.php?76114-Work-... advocates.
And no that is not worth much. I know almost nothin about PHP, and prefer to keep things that way.