Home  >  Article  >  Backend Development  >  Why does php strpos not found and need to use ===false to make a judgment?

Why does php strpos not found and need to use ===false to make a judgment?

巴扎黑
巴扎黑Original
2016-11-10 13:21:592106browse

If the corresponding substring is not found in this string, it will return false

If this substring is located at the beginning of the string, it will return 0

In order to distinguish 0 and false, you must use the equality operator === Or! ==


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
Previous article:php lookandsayNext article:php lookandsay