I have an encryption that I'm porting to multiple languages and I wanted to include PHP. The encryption uses unsigned longs for a lot of bitwise logic as well as multiplication. Is there a way in PHP I can specify that I want a variable to be a long (int64)? Better yet a ulong? Will there be an error if the long/ulong overflows? Ideally, in the encryption any overflow would go unchecked and is just truncated off the value. I'd rather let the language truncate then me having to MOD after every multiplication to ensure it stays within it's proper bounds.
PS. I want to write the code so it'll work the same on 32 bit OSes and 64 bit OSes. I'll be testing on 32 bit though.
PS. I want to write the code so it'll work the same on 32 bit OSes and 64 bit OSes. I'll be testing on 32 bit though.