Re: RFC: blank() Function as a Complement to empty()

From: Date: Sat, 05 Apr 2025 19:18:41 +0000
Subject: Re: RFC: blank() Function as a Complement to empty()
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sat, Apr 5, 2025, at 21:10, Bilge wrote:
> On 05/04/2025 19:41, Rob Landers wrote:
>> empty() has very many uses.
> That is exactly the same as saying == has many uses. It does. So many uses that
> it's useless. Its semantics are nonsense.
>> 
>> if (isset($var) && $varl != false) {
>>   foo($bool);
>> }
>> 
> >$varl != false
> 
> You should never be doing this.
> 
> 
> Cheers,
> Bilge
> 

Heh, to quote a great movie: That's just like, your opinion, man. In all seriousness, there are
quite a number of uses for ==, especially because we don't have operators on objects, nor do we
have value objects. Sometimes, equality isn't based on identity, but on value:

https://3v4l.org/rRMNR

— Rob


Thread (16 messages)

« previous php.internals (#127054) next »