pack 参数详情请参考 http://www.php.net/manual/en/function.pack.php
$info = array(0x33, 0x30, 0x35, 0x30, 0x30, 0x31, 0x35, 0x30, 0x2e, 0x36, 0x36);
for ($i = 0; $i < sizeof($info) / 2; $i++) {
$msg = pack("nvc*", $info[$i * 2], isset($info[$i * 2 + 1]) ? $info[$i * 2 + 1] : '');
echo trim($msg);
}
# output: 30500150.66
OR
$info = array(0x33, 0x30, 0x35, 0x30, 0x30, 0x31, 0x35, 0x30, 0x2e, 0x36, 0x36);
foreach ($info as $k => $v) {
$msg = pack("n", $v);
echo trim($msg);
}
# output: 30500150.66