I am working on a PHP application and mathematical operation was resulting wrong answer which was displaying wrong results. So, I started digging down and after few hours effort I was able to detect the issue.
Here is the problematic Expression:
echo -1 % 26;
The answer should be 25
but it gives -1
. I don't know, is there anything wrong with my expression?
Can anyone please identify, where is the problem?