<bdo id='tD540'></bdo><ul id='tD540'></ul>

<tfoot id='tD540'></tfoot>
  • <small id='tD540'></small><noframes id='tD540'>

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

        php 为空时为空?

        时间:2023-10-15
        • <bdo id='qohqt'></bdo><ul id='qohqt'></ul>
            • <tfoot id='qohqt'></tfoot>

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

              <legend id='qohqt'><style id='qohqt'><dir id='qohqt'><q id='qohqt'></q></dir></style></legend>

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

                  本文介绍了php 为空时为空?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I have a question regarding NULL in PHP:

                    $a = '';
                    if($a == NULL) {
                        echo 'is null';
                    }
                  

                  Why do I see is null when $a is an empty string? Is that a bug?

                  解决方案

                  What you're looking for is:

                  if($variable === NULL) {...}
                  

                  Note the ===.
                  When use ==, as you did, PHP treats NULL, false, 0, the empty string, and empty arrays as equal.

                  这篇关于php 为空时为空?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:PHP 中的 Null 与 False 与 0 下一篇:在 PHP 中,NULL 和将字符串设置为等于 2 个单引号有什么区别

                  相关文章

                    <bdo id='AHurN'></bdo><ul id='AHurN'></ul>

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

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