Link to working draft: https://bit.ly/php-0001 <https://bit.ly/php-0001>
Discussion on implementing a means by which a class instance can interacted with syntactically as a boolean. At this point in the discuss the only means discussed is creation of a method (magic or via an interface). Ability to cast is not ruled out. And, my limited knowledge of PHP at this depth, much less under the hood, means there could be a lot of unknown unknowns regarding the ways a boolean can be interpreted and interacted with; therefore, those may not be covered at this time. I’m also not liking the overly contrived nature of the samples and will improve those over time should interest maintain or increase. Cheers, Josh ps. If you have any feedback or information on social interactions here that might help, please do let me know, normally I would have watched for a while before putting my foot in - hopefully it doesn’t end up in my mouth. :)