Re: [PHP-WIN] Need to read a double value from a binary file

2002-11-13 Thread Rasmus Lerdorf
$float = (float)$string; On Tue, 12 Nov 2002, Juan Carlos Gonzalez wrote: > Hi all! I need to read 8 bytes from a binary file (shp file) and cast it to > its double value... > > I'm having problems because PHP casts it automaticlly to a string using > fread; I can't find the function to cast it c

[PHP-WIN] Need to read a double value from a binary file

2002-11-13 Thread Juan Carlos Gonzalez
Hi all! I need to read 8 bytes from a binary file (shp file) and cast it to its double value... I'm having problems because PHP casts it automaticlly to a string using fread; I can't find the function to cast it correctly, because floatval only removes the non-numeric parts of the variable, but it