php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #22737 Rename empty()
Submitted: 2003-03-16 12:26 UTC Modified: 2003-03-17 19:41 UTC
From: php dot net at trenkner dot de Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.0 OS: ANY
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php dot net at trenkner dot de
New email:
PHP Version: OS:

 

 [2003-03-16 12:26 UTC] php dot net at trenkner dot de
Maybe this is a FAQ but I didn't found it, so...

The function empty() seems to be named inconsistently. We say is_null, is_string, is_object so why there is no function is_empty()? BTW isset() is also not in sync :-(

I would like to see a function is_empty() which behaves in the same way then empty(), same for is_set() replacing isset().

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-17 11:10 UTC] jay@php.net
So what's your plan to mitigate BC problems? What about 
the users who have written their own functions called 
is_empty() and is_set()? 
 
You can't just replace something as commonly used as 
isset() or empty(). 
 
If you really want this functionality, wrap a userland 
function around empty() and isset(), because the odds of 
this changing are infintesimally small. 
 
J 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 03:01:30 2024 UTC