> On 10 Nov 2023, at 20:00, Rowan Tommins <rowan.coll...@gmail.com> wrote: > [...] Wherever it is used, "null" is a confusing and often controversial > concept. In different contexts, it is used for different things, and has > different ideal behaviours. It's a whole debate on its own, and bringing in > other types of coercion just confuses the conversation.
Thanks for the background detail Rowan, that is useful (I have re-read a few times). I know I won't have a 2/3 support for NULL coercion with function parameters, so I'll just wait until 9.0 is made available, and assuming I'm correct (hopefully I'm not), we can address the BC problems then. For now, I'll just try to remember to do things like `(trim(strval($search)) != '')`, and hope that static analysis tools move their NULL type check down to their lowest level: https://github.com/phpstan/phpstan/issues/10127 Craig -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php