Re: New RFC : empty() function

From: Date: Mon, 30 Oct 2023 17:25:21 +0000
Subject: Re: New RFC : empty() function
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-121536@lists.php.net to get a copy of this message
I would be voting against any function that checks for "empty". The empty() construct we have now should almost never be used in any reasonable code. It should be avoided at all cost. For this reason, I see no need to introduce a new variant of the same thing. I also don't believe there is any need to fix or change the existing construct. Leave it as it is for use in legacy projects. Maybe in a distant future we will be able to deprecate it or maybe we won't. While I personally consider it a menace, I don't mind it existing in the language. But please do not add any similar functionality.

« previous php.internals (#121536) next »