|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-18 21:05 UTC] pedropla at holidaymarketing dot com
[2003-08-19 03:01 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 01:00:02 2025 UTC |
Description: ------------ Since upgrading to php: PHP 4.3.3RC3 (cli) (built: Aug 16 2003 11:22:58) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies it seems that many of my php programs which use ! is_null($var) have broken, however when I replace the function is_null for a comparison: $var != NULL, it works. Is this a bug? Or some new "feature"? Many thanks Reproduce code: --------------- Fails: function name ($setTo=NULL) { if (! is_null($setTo)) { return "Not null"; } return "null"; } Works: function name ($setTo=NULL) { if ($setTo != NULL) { return "Not null"; } return "null"; } Expected result: ---------------- return null when null and not null when not null Actual result: -------------- works only with comparison != and not with !is_null() function