Re: [RFC][Discussion] Objects can be declared falsifiable

From: Date: Wed, 15 Jul 2020 16:04:28 +0000
Subject: Re: [RFC][Discussion] Objects can be declared falsifiable
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-111024@lists.php.net to get a copy of this message
> > > I don't see how that would happen. What non-pathological case would allow > for $foo && !$foo == true? > > I suppose something a little less pathological would be $collection && $collection->pop() && !$collection which is still pretty icky (to me at least). The other implication is that this is now possibly *not* a bug: if (!$foo) { $foo->bar(); } which, again, would ever-so-slightly reduce the effectiveness of static analysis.

« previous php.internals (#111024) next »