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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 02:01:33 2025 UTC