How to get binary representation of floating-point number in PHP?

前端 未结 4 1239
长情又很酷
长情又很酷 2021-01-17 16:18

Is there any way to get the binary representation of a floating point number in PHP? Something like Java\'s Double.doubleToRawLongBits().

Given a positive floating p

4条回答
  •  忘掉有多难
    2021-01-17 16:49

    This isn't a full answer, but the only way I know of to put a float into binary is with pack()

提交回复
热议问题