<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # <?php 進制轉換 十六進制中, 每兩個為一個byte, 如4字節表示`00 00 00 FF` ## 二進制與十進制 ```php >>> decbin(11) // 十進制到二進制 1011 >>> bindec(1011) // 二進制到十進制 11 ``` ## 十進制與八進制 ```php >>> octdec(156) // 八進制到十進制 int(110) >>> decoct(110) // 十進制到八進制 string(3) "156" ``` ## 十進制與十六進制 ```php >>> dechex(156778) // 十進制到十六進制 string(5) "2646a" >>> hexdec('2646a') // 十六進制到十進制 int(156778) ``` ## ASCII與十六進制 ```php >>> bin2hex('php是世界上最...') // ASCII到十六進制 string(42) "706870e698afe4b896e7958ce4b88ae69c802e2e2e" >>> hex2bin('706870e698afe4b896e7958ce4b88ae69c802e2e2e') // 十六進制還原ASCII字符串 string(21) "php是世界上最..." ``` ## 小總結 - 二進制 `bin` - 八進制 `oct` - 十進制 `dec` - 十六進制 `hex` 單詞搭配就是相應的轉換方法~ ## 任意進制轉換 > string base_convert(string $number, int $frombase, int $tobase) ```php >>> base_convert(120, 10, 2) // 十進制到二進制 string(7) "1111000" ``` - $number 欲轉換的數值 - $frombase 轉換前進制, 2-36之間整數 - $tobase 轉換后進制, 2-36之間整數 **注意事項: 由于使用內部的 "double" 或 "float" 類型,base_convert()的操作可能會導致大數值中的精度丟失** ## pack & unpack 用法 參考優秀文章: - [PHP中pack、unpack的詳細用法](https://segmentfault.com/a/1190000008305573)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看