<small id='llfv4'></small><noframes id='llfv4'>

  • <tfoot id='llfv4'></tfoot>

    • <bdo id='llfv4'></bdo><ul id='llfv4'></ul>
      <i id='llfv4'><tr id='llfv4'><dt id='llfv4'><q id='llfv4'><span id='llfv4'><b id='llfv4'><form id='llfv4'><ins id='llfv4'></ins><ul id='llfv4'></ul><sub id='llfv4'></sub></form><legend id='llfv4'></legend><bdo id='llfv4'><pre id='llfv4'><center id='llfv4'></center></pre></bdo></b><th id='llfv4'></th></span></q></dt></tr></i><div id='llfv4'><tfoot id='llfv4'></tfoot><dl id='llfv4'><fieldset id='llfv4'></fieldset></dl></div>
      1. <legend id='llfv4'><style id='llfv4'><dir id='llfv4'><q id='llfv4'></q></dir></style></legend>
      2. 字节转换为浮点数(php)

        时间:2023-10-31
        <tfoot id='vXqvt'></tfoot>
        • <i id='vXqvt'><tr id='vXqvt'><dt id='vXqvt'><q id='vXqvt'><span id='vXqvt'><b id='vXqvt'><form id='vXqvt'><ins id='vXqvt'></ins><ul id='vXqvt'></ul><sub id='vXqvt'></sub></form><legend id='vXqvt'></legend><bdo id='vXqvt'><pre id='vXqvt'><center id='vXqvt'></center></pre></bdo></b><th id='vXqvt'></th></span></q></dt></tr></i><div id='vXqvt'><tfoot id='vXqvt'></tfoot><dl id='vXqvt'><fieldset id='vXqvt'></fieldset></dl></div>
          1. <legend id='vXqvt'><style id='vXqvt'><dir id='vXqvt'><q id='vXqvt'></q></dir></style></legend>

            <small id='vXqvt'></small><noframes id='vXqvt'>

                  <tbody id='vXqvt'></tbody>

                  <bdo id='vXqvt'></bdo><ul id='vXqvt'></ul>
                  本文介绍了字节转换为浮点数(php)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在 php 中将字节转换为浮点数?就像在 Java 中一样

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

                  int i = (byte3 & 0xff) << 24 | (byte2 & 0xff) << 16 | (byte1 & 0xff) << 8 | byte0 & 0xff; 
                  Float.intBitsToFloat(i);
                  

                  推荐答案

                  可能有更直接的方法,但是给你:

                  There may be a more direct way, but here you go:

                  <?php
                  var_dump(unpack('f', pack('i', 1059760811)));
                  ?>
                  

                  当然,这取决于机器,但我不知道任何运行 PHP 的机器不使用 IEEE 754 浮点数.

                  This is, of course, machine dependent, but I don't know of any machine running PHP that doesn't use IEEE 754 floats.

                  这篇关于字节转换为浮点数(php)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:php浮点数计算小数点后2位 下一篇:通过 PHP 脚本将文件从 FTP 服务器下载到带有 Content-Length 标头的浏览器,而无需将文件存储在 W

                  相关文章

                • <small id='7CKRJ'></small><noframes id='7CKRJ'>

                    <bdo id='7CKRJ'></bdo><ul id='7CKRJ'></ul>
                  <i id='7CKRJ'><tr id='7CKRJ'><dt id='7CKRJ'><q id='7CKRJ'><span id='7CKRJ'><b id='7CKRJ'><form id='7CKRJ'><ins id='7CKRJ'></ins><ul id='7CKRJ'></ul><sub id='7CKRJ'></sub></form><legend id='7CKRJ'></legend><bdo id='7CKRJ'><pre id='7CKRJ'><center id='7CKRJ'></center></pre></bdo></b><th id='7CKRJ'></th></span></q></dt></tr></i><div id='7CKRJ'><tfoot id='7CKRJ'></tfoot><dl id='7CKRJ'><fieldset id='7CKRJ'></fieldset></dl></div>

                    <legend id='7CKRJ'><style id='7CKRJ'><dir id='7CKRJ'><q id='7CKRJ'></q></dir></style></legend>

                  1. <tfoot id='7CKRJ'></tfoot>