php - Function unpack() shows different results -


i'm trying unpack hex 4-bytes float:

var_dump(unpack("f", "\x3c\x6b\x2c\x45")); 

but when execute in cli , via web different results.

  • via cli: float(2758.7021484375)
  • via web: float(3.3106399961764e+21)

phpversion() returns 5.3.10-1ubuntu3.7

why?


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -