Integer size is platform-dependent, safest is to assume a maximum value of about two billion (32 bits signed).
64-bit platforms usually have a maximum value of about 9E18
Unsigned integers are not supported in PHP
If PHP encounters a number, or the result of an operation, that is beyond the bounds of the integer type, it will be interpreted as a float instead.
Operators you can use
$StatusFlagGpsCommsOk = 0; if ($StatusFlags & 0x01) $StatusFlagGpsCommsOk = 1; $MyValue &= 0x05;
Doesn’t look like >>= and <<= can be used, but << and >> are valid operators in PHP
$MyValue = 0x00001; $MyValue = $MyValue << 5; $MyValue <<= 5;
Bits that are set in $a are not set, and vice versa.
$MyVariable = ~(0); $MyVariable = ~($MyVariable);