Doc #80714 [NEW]: $a == $b it's false if $a and $b have the same key/value pairs
| From: | glushkov1997 at icloud dot com | Date: | Fri, 05 Feb 2021 12:56:19 +0000 |
| Subject: | Doc #80714 [NEW]: $a == $b it's false if $a and $b have the same key/value pairs | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-18506@lists.php.net to get a copy of this message | ||
From: glushkov1997 at icloud dot com
Operating system: Windows
PHP version: 7.4.15
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:$a == $b it's false if $a and $b have the same key/value pairs
Description:
------------
---
From manual page: https://php.net/language.operators.array
---
Hello!
var_dump(['15', '18'] == ['18', '15']); //it's false
I think there is a documentation's mistake
$a == $b Equality true if $a and $b have the same key/value pairs.
Please check. Have a good day!
Test script:
---------------
var_dump(['15', '18'] == ['18', '15']); //it's false
Expected result:
----------------
var_dump(['15', '18'] == ['18', '15']); // true
Actual result:
--------------
var_dump(['15', '18'] == ['18', '15']); //it's false
--
Edit bug report at https://bugs.php.net/bug.php?id=80714&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80714&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80714&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80714&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80714&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80714&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80714&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80714&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80714&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80714&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80714&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80714&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80714&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80714&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80714&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80714&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80714&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80714&r=mysqlcfg