#25292 [Opn->Bgs]: is_null(1) and comparison with null produce different results

From: Date: Thu, 28 Aug 2003 15:57:38 +0000
Subject: #25292 [Opn->Bgs]: is_null(1) and comparison with null produce different results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46866@lists.php.net to get a copy of this message
ID: 25292 Updated by: sniper@php.net Reported By: dizza at students dot ru -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: FreeBSD 5.1 PHP Version: 4.3.3 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. To get support, pay us something first. Otherwise, go ask this kind of stupid questions on the mailing lists. *sigh* Previous Comments: ------------------------------------------------------------------------ [2003-08-28 08:24:54] dizza at students dot ru 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 this bug report at http://bugs.php.net/?id=25292&edit=1

« previous php.bugs (#46866) next »