I use a database that stores data in decimal. I convert it to binary so I can just read it as on and off. I haven't had any issues up until the decimal length gets over 6 characters.
The following works:
$value = 2147614720;
$value = decbin($value);
Output: 10000000000000100000000000000000
However, if I try to pull that value from the database, it doesn't work if it's over 6 characters.
$value = $row['decimalvalue'];
$value = decbin($value);
Output: 1111111111111111111111111111111
Any help would be great. Thank you.