IP2Location.php
private static function bcBin2Dec($data) {
	$parts = array(
		unpack('V', substr($data, 12, 4)),
		unpack('V', substr($data, 8, 4)),
		unpack('V', substr($data, 4, 4)),
		unpack('V', substr($data, 0, 4)),
	);

	foreach($parts as &$part)
		if($part[1] < 0)
			$part[1] += 4294967296;

	$result = bcadd(bcadd(bcmul($parts[0][1], bcpow(4294967296, 3)), bcmul($parts[1][1], bcpow(4294967296, 2))), bcadd(bcmul($parts[2][1], 4294967296), $parts[3][1]));

    return $result;
  }
private static function bcBin2Dec($data) {
	$parts = array(
		unpack('V', substr($data, 12, 4)),
		unpack('V', substr($data, 8, 4)),
		unpack('V', substr($data, 4, 4)),
		unpack('V', substr($data, 0, 4)),
	);

	foreach($parts as &$part)
		if($part[1] < 0)
			$part[1] += 4294967296;

	$result = bcadd(bcadd(bcmul($parts[0][1], bcpow(4294967296, 3)), bcmul($parts[1][1], bcpow(4294967296, 2))), bcadd(bcmul($parts[2][1], 4294967296), $parts[3][1]));

    return $result;
  }
private static function bcBin2Dec ( $ data ) { $ parts = array ( unpack ( 'V' , substr ( $ data , 12 , 4 ) ) , unpack ( 'V' , substr ( $ data , 8 , 4 ) ) , unpack ( 'V' , substr ( $ data , 4 , 4 ) ) , unpack ( 'V' , substr ( $ data , 0 , 4 ) ) , ) ; foreach ( $ parts as & $ part ) if ( $ part [ 1 ] < 0 ) $ part [ 1 ] += 4294967296 ; $ result = bcadd ( bcadd ( bcmul ( $ parts [ 0 ] [ 1 ] , bcpow ( 4294967296 , 3 ) ) , bcmul ( $ parts [ 1 ] [ 1 ] , bcpow ( 4294967296 , 2 ) ) ) , bcadd ( bcmul ( $ parts [ 2 ] [ 1 ] , 4294967296 ) , $ parts [ 3 ] [ 1 ] ) ) ; return $ result ; }
Return the decimal string representing the binary data given

@access private
@static
@param string $data  Binary data to parse
@return string
Return the decimal string representing the binary data given