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

      <small id='5fcM4'></small><noframes id='5fcM4'>

      • <bdo id='5fcM4'></bdo><ul id='5fcM4'></ul>

        <legend id='5fcM4'><style id='5fcM4'><dir id='5fcM4'><q id='5fcM4'></q></dir></style></legend>
      1. PHP 认为 null 等于零

        PHP considers null is equal to zero(PHP 认为 null 等于零)

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

            1. <small id='ewWXu'></small><noframes id='ewWXu'>

                    <tbody id='ewWXu'></tbody>
                  本文介绍了PHP 认为 null 等于零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 PHP 中,($myvariable==0)当 $myvariable 为零时,表达式的值为真;当 $myvariable 为 null 时,此表达式的值也为 true.如何排除第二种情况?我的意思是我希望表达式仅在 $myvariable 为零时才为真.我当然可以写

                  In PHP, ($myvariable==0) When $myvariable is zero, the value of the expression is true; when $myvariable is null, the value of this expression is also true. How can I exclude the second case? I mean I want the expression to be true only when $myvariable is zero. Of course I can write

                  ($myvariable != null && $myvariable == 0)
                  

                  但是还有其他优雅的方法来做到这一点吗?

                  But is there other elegant way to do this?

                  推荐答案

                  $myvariable === 0
                  

                  阅读有关比较运算符的更多信息.

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

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

                  相关文档推荐

                  Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                  How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                  htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                  Joomla include database functions(Joomla 包含数据库功能)
                  nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                  Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)

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

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

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

                              <tbody id='tntYw'></tbody>