Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当标点符号在字符串中时,PHP可以检查是否相等?我尝试与 比较,但hello'与比较时hello'它们不相等==。
hello'
==
它正确地比较字符串:
"hello'" == "hello'" // true
键盘
你一定做错了什么。也许您'在单引号字符串中使用而没有像这样转义它\'并且得到奇怪的结果。
'
\'