Thanks.. you read my mind. I've been browsing all the bitwise bug reports there and it's sort of facinating. There are lots of reports of problems with bitwise operations, but they all get marked at "bogus" or "closed" with some sort of reference that it will never be fixed and use GMP instead 😉
One bug report had this for an answer:
"-2147483649 is to big for a PHP int so it is actually treated as a
float, and the behavior of & on floats is undefined"
and while I do see my value is seen as a float, it works properly on all my other PHP machines, so something has changed.
In any event, I tried the GMP function and that gives the correct answer. Only problem is that I'd have to rewrite this entire encryption library that's already working on all the other machines. (at that point it might be faster to just nuke the box and go back to one of those established working configs).
Anyways, thanks for your help.