jphp
jphp copied to clipboard
intdiv is not working properly.
Currently:
intdiv(3315714752669, 10) === 15
This is incorrect, and it should be
intdiv(3315714752669, 10) === 331571475266
Hi @eduardoejp , thanks for reporting this. Indeed, I managed to reproduce this wired the bug.
Here what is happen: the input gets casted to int
because intdiv
method implemented in Java accepts integers. So 3315714752669 became 157 after casting to int
only then divided by 10 which gives actual result.
Given that JPHP seems to work fine with longs in general, can intdiv
be made to work with longs so that it works correctly?
#425 should resolve the issue.