Integers are the size of pointers on this platform. (32-bit PHP -> 32-bit integers. 64-bit PHP -> 64-bit integers).
Note that when overflowing integer operations, variables become float. The PHP documentation explains it all well.
I'm not sure what you are doing in your code so that you take care of what size an integer is. However, if you only care about 32-bit values, you can always mask low 32 bits:
$val = $something & 0xFFFFFFFF;
source share