PHP is adding union types, and even has a 'false' type to clarify the possible return values from built in functions! https://wiki.php.net/rfc/union_types_v2
Related Posts
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.
I'm never sure how to convert words with hyphens into SCREAMING_SNAKE_CASE. For example, should built-in function be BUILT_IN_FUNCTION or BUILTIN_FUNCTION?
Really cute approach to reporting type errors: when there's a type error, show an example of a runtime error that the type check has prevented!
Data-Driven Techniques for Type Error Diagnosis https://escholarship.org/uc/item/59s4h4pv