I’m trying to implement two methods in PHP and JAVA that return a common integer and have the same output.
internal parameters match but when it comes to modular division, it fails.
My numbers are stored as int.
In PHP i have this result
1192581159 % 100000000 = 85278720
In Java i have this result
1192581159 % 100000000 = 92581159
LATER_EDIT_WHILE_POSTING_QUESTION i think 1192581159 is bigger that PHP_MAX_INT , a possible solution is to treat it as a string and apply substrings in order to get correct result from Java
solution is described here
Modulus PHP Problem
my approach was to treat 1192581159 as a string and substring the result needed for my calculations