Bug #62579 [Opn->Nab]: two strings compare
| From: | ab@php.net | Date: | Mon, 16 Jul 2012 12:51:09 +0000 |
| Subject: | Bug #62579 [Opn->Nab]: two strings compare | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172001@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62579&edit=1
ID: 62579
Updated by: ab@php.net
Reported by: bugzilla33 at gmail dot com
Summary: two strings compare
-Status: Open
+Status: Not a bug
Type: Bug
Package: Strings related
Operating System: win7
PHP Version: 5.4.5RC1
Block user comment: N
Private report: N
New Comment:
Also this for further reading http://php.net/manual/de/language.types.type-
juggling.php
Previous Comments:
------------------------------------------------------------------------
[2012-07-16 12:49:53] ab@php.net
I think you'll find this page useful :)
http://www.php.net/manual/en/language.operators.comparison.php
------------------------------------------------------------------------
[2012-07-16 12:41:53] bugzilla33 at gmail dot com
Why should be used === for exact matching?
left is string and right is string - the same type
------------------------------------------------------------------------
[2012-07-16 12:36:16] ab@php.net
=== should be used for exact matching.
------------------------------------------------------------------------
[2012-07-16 12:21:13] bugzilla33 at gmail dot com
Description:
------------
two strings compare
Test script:
---------------
var_dump('00'=='000')
Expected result:
----------------
bool(false)
Actual result:
--------------
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62579&edit=1