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 bro
2,147,483,647 is the biggest possible positive value for an integer in 32 bit computing, (it's 2^16, half of the 32 bits we have, the other half are reserved for negative numbers.)
Once you use a number bigger than that in a 32 bit system you start getting screwy results as the computer thinks it's a negative number. see https://en.wikipedia.org/wiki/Integer_(computer_science)