note 123649 added to function.is-null

From: Date: Sun, 03 Mar 2019 19:11:36 +0000
Subject: note 123649 added to function.is-null
Groups: php.notes 
Request: Send a blank email to php-notes+get-210313@lists.php.net to get a copy of this message
This function should never be used, should become deprecated, and eventually should get removed from the language. There is no point to it being part of the language. The language already supports more explicit inquiries directly in itself via $var === null or $var == null. The function is_null($var) is not less characters and is not more readable in the ways that matter. Saying that is_null() is more readable would be like saying we should add an is_1(), is_true(), and is_equal() function to the language for the sake of readability. All this kind of thing does is invite questions about what the function would consider to be null. You might think "Wait, does this check it like $var == null or $var === null"? That kind of questioning then leads to things like testing it, looking it up in the documentation, writing comments about how it should be removed, other people reading, moderating, and responding to those comments, so on and so forth. ---- Server IP: 209.126.17.76 Probable Submitter: 99.95.117.98 ---- Manual Page -- http://php.net/manual/en/function.is-null.php Edit -- https://master.php.net/note/edit/123649 Del: integrated -- https://master.php.net/note/delete/123649/integrated Del: useless -- https://master.php.net/note/delete/123649/useless Del: bad code -- https://master.php.net/note/delete/123649/bad+code Del: spam -- https://master.php.net/note/delete/123649/spam Del: non-english -- https://master.php.net/note/delete/123649/non-english Del: in docs -- https://master.php.net/note/delete/123649/in+docs Del: other reasons-- https://master.php.net/note/delete/123649 Reject -- https://master.php.net/note/reject/123649 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210313) next »