1. <legend id='IkBLP'><style id='IkBLP'><dir id='IkBLP'><q id='IkBLP'></q></dir></style></legend>

      • <bdo id='IkBLP'></bdo><ul id='IkBLP'></ul>

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

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

        字符串字面量前面的 b 有什么作用?

        What does the b in front of string literals do?(字符串字面量前面的 b 有什么作用?)
        <legend id='mCrfY'><style id='mCrfY'><dir id='mCrfY'><q id='mCrfY'></q></dir></style></legend>

          <tfoot id='mCrfY'></tfoot>
            <bdo id='mCrfY'></bdo><ul id='mCrfY'></ul>
                <tbody id='mCrfY'></tbody>

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

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

                1. 本文介绍了字符串字面量前面的 b 有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  $binary = b'Binary string';
                  

                  将字符串创建为 binary 有什么后果?

                  What consequences does it have to create a string as binary?

                  我在文档中找不到任何关于此的提示.刚刚在浏览 language_scanner 时发现了这个小小的好奇心.

                  I couldn't find any hint about that in the documentation. Just found this little curiosity while looking through the language_scanner.

                  推荐答案

                  这是一个前向兼容性令牌,适用于永远不会发布的 PHP 版本 6,它应该具有本机 unicode 支持.

                  This is a forward compatibility token for the never-to-be-released PHP version 6, which should have had native unicode support.

                  在 PHP6 中,字符串默认为 unicode,函数在 unicode 字符级别对其进行操作.这个b"的意思是二进制字符串",即非unicode字符串,函数在字节级别对它进行操作.

                  In PHP6, strings are unicode by default, and functions operate at the unicode character level on them. This "b" means "binary string", that is, a non unicode string, on which functions operate at the byte level.

                  这在 PHP != 6 中无效,其中所有字符串都是二进制的.

                  This has no effect in PHP != 6, where all strings are binary.

                  这篇关于字符串字面量前面的 b 有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I pass parameters into a PHP script through a webpage?(如何通过网页将参数传递给 PHP 脚本?)
                  PHP - include a php file and also send query parameters(PHP - 包含一个 php 文件并发送查询参数)
                  Where can I read about conditionals done with quot;?quot; and quot;:quot; (colon)?(我在哪里可以阅读有关使用“?完成的条件的信息?和“:(冒号)?)
                  Accessing arrays whitout quoting the key(在不引用键的情况下访问数组)
                  What is the name for the quot;lt;lt;lt;quot; operator?(“lt;lt;lt;的名字是什么?操作员?)
                  default as first option in switch statement?(默认为 switch 语句中的第一个选项?)

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

                          <tbody id='w0cM5'></tbody>

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

                        • <bdo id='w0cM5'></bdo><ul id='w0cM5'></ul>
                          • <legend id='w0cM5'><style id='w0cM5'><dir id='w0cM5'><q id='w0cM5'></q></dir></style></legend>
                          • <tfoot id='w0cM5'></tfoot>