php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27353 inconsistency in == comparison table docs
Submitted: 2004-02-22 14:07 UTC Modified: 2004-02-22 14:26 UTC
From: jason dot thurston at mckesson dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2004-02-22 14:07 UTC] jason dot thurston at mckesson dot com
Description:
------------
The "==" comparison table L-2 on url:
http://www.php.net/manual/en/types.comparisons.php

Table L-2. Loose comparisons with == 
documentation demonstrates the following:

accross            down            result
-------          ----------       --------
array()    ==       null            true
null       ==       array()         false


However, I'd expect both to be true as is what I see in the code fragment below.



Reproduce code:
---------------
echo "(null == array()) = " .( null==array() ? "true" : "false" ) . "\n";
echo "(array() == null) = " . ( array()==null ? "true" : "false" ) . "\n";






Expected result:
----------------
I expect to see what I get.  However, the documentation would lead one to expect a different results.

(null == array()) = true
(array() == null) = true




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-22 14:26 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=69c4ce3c82cbce4aaae77c0a39e491667d444524
Log: fix #27353
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Sep 10 22:00:01 2025 UTC