bytes konvertieren float (php)

Wie kann ich umwandeln von bytes zu float in php? Wie in Java

int i = (byte3 & 0xff) << 24 | (byte2 & 0xff) << 16 | (byte1 & 0xff) << 8 | byte0 & 0xff; 
Float.intBitsToFloat(i);
Können Sie ein Beispiel geben, wie Sie erwarten, dass die bytes werden umgewandelt zu schweben?
meinst du das konvertieren von int zu float?
Beispiel: bytes: 1059760811 Muss in float 0.6666667
1059760811 ist nicht durch eine definition eine byte-Zahl. Bytes reichen von 0-255.
Wie kann ich remade: int i = (byte3 & 0xff) << 24 | (byte2 & 0xff) << 16 | (byte1 & 0xff) << 8 | byte0 & 0xff; Float.intBitsToFloat(i);

InformationsquelleAutor Valdas | 2010-04-12

Schreibe einen Kommentar