function parse_unsigned_int($string) { $x = (float)$string; if ($x > (float)2147483647) $x -= (float)"4294967296"; return (int)$x; }