When I try to perform bitwise XOR operation in php and js, they are producing different results in some cases , for example
2166136261 ^ 101 = -2128831072 on browsers (js)
2166136261 ^ 101 = 2166136224(php)
My understanding is because php is running 64 bit as opposed to 32 bit js.
Can anyone tell me the exact reason and if this could be solved so that both operations result in same value. Thanks!
>>> 0, if you continue with other integer operation it'll just go back to signed again so it's mostly (but not entirely) a cosmetic change.