On Tue, 14 Jul 2020 at 19:59, Josh Bruce <j...@joshbruce.dev> wrote: > Implement an interface and magic method to allow objects to represent > false (or empty) while still be valid instances of the custom object (type). > > https://wiki.php.net/rfc/objects-can-be-falsifiable < > https://wiki.php.net/rfc/objects-can-be-falsifiable> > > If you saw the latest from this morning, not much has changed except > hopefully improved formatting and now being the official mix of things. > > If this is your first time, the cues are taken from: > > - __toString() > - Stringable > - and __toArray() (not accepted or approved yet) > > Thank you for all the feedback and patience so far, appreciate it! > > Cheers, > Josh
I'm not sure I love this (mostly from a static analysis standpoint). It means that there would exist some `$foo` with the property that `$foo && !$foo` evaluates to true. That seems to be a bad place for a language to go, and it would increase the false-negative rate of static analysis tools.