#25292 [NEW]: is_null(1) and comparison with null produce different results
| From: | dizza at students dot ru | Date: | Thu, 28 Aug 2003 13:24:54 +0000 |
| Subject: | #25292 [NEW]: is_null(1) and comparison with null produce different results | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-46839@lists.php.net to get a copy of this message | ||
From: dizza at students dot ru
Operating system: FreeBSD 5.1
PHP version: 4.3.3
PHP Bug Type: Scripting Engine problem
Bug description: is_null(1) and comparison with null produce different results
Description:
------------
When calling is_null(1) for a varibale and compare it with
null I get different result.
Shouldn't it produce the same result?
Reproduce code:
---------------
$arr = array();
echo( is_null( $arr ) ? "is_null: NULL\n" : "is_null: NOT NULL\n" );
echo( (null == $arr) ? "null: NULL\n" : "null: NOT NULL\n" );
Expected result:
----------------
is_not: NOT NULL
null: NULL
--
Edit bug report at http://bugs.php.net/?id=25292&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25292&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25292&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25292&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25292&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25292&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25292&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25292&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25292&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25292&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25292&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25292&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25292&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25292&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25292&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25292&r=gnused