On Oct 29, 2023, at 3:23 PM, Robert Landers <landers.rob...@gmail.com<mailto:landers.rob...@gmail.com>> wrote:
Because falsy is different than null/non-existent. The closest equivalent is "array_key_exists" (instead of empty/isset) but this proposal isn't just applicable to arrays. I run into this pattern of "if not null, then do something with the value" pretty often and it is tedious to type it out. In terms of falsy values, null coalescing operator ?? is a syntactic sugar for isset(). So, ?! operator will be equivalent to !isset() expression in the ternary. For the reference: https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op