bytes convert to float (php)

后端 未结 3 693
栀梦
栀梦 2020-12-04 00:46

How can I convert from bytes to float in php? Like in Java

int i = (byte3 & 0xff) << 24 | (byte2 & 0xff) << 16 | (byte1 & 0xff) <&         


        
3条回答
  •  情歌与酒
    2020-12-04 01:18

    I don't think php has bytes, does it? When you assign a number to a variable you'll get an variable with a number type

    $a = 10; // integer
    $f = 1.0; // double
    $b = $a + $f; // $b is double
    

提交回复
热议问题