How to cast a 32-bit integer from unsigned to signed in MySQL or PHP?
If you just cast the number to an integer in PHP, it will do the trick.
echo (int)3232240316 . "\n";
gives
-1062726980
Note: if you want to cast a signed int to an unsigned int in PHP, just do this:
$number += 4294967296;
Example:
$number = -1062726980;
echo $number . "\n";
$number += 4294967296;
echo $number . "\n";
gives:
-1062726980
3232240316