Home >Backend Development >PHP Tutorial > php中的strpos没返回值

php中的strpos没返回值

WBOY
WBOYOriginal
2016-06-13 13:22:09972browse

php中的strpos没有返回值
echo strpos("jjjj333","jf");没有返回false啊是怎么回事?

------解决方案--------------------
var_dump( strpos("jjjj333","jf")); //这样才行
------解决方案--------------------

PHP code

if(strpos('jjjj333','jf') === false)
{
    echo "failed";
}else{
    echo "success";
} <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn