Hi, > Why not create a separate RFC to deprecate and remove(9.0) this and others > strange cast behaviors. > > Then after it finishes decide how to processed with this one?
We did some research with Nicolas about deprecating casting null instead of proposing a new `(!type)` operator. The idea did not make it, and we explained why in this new section: https://wiki.php.net/rfc/nullable-not-nullable-cast-operator#alternative_considereddeprecating_null_casting As for other strange (or "fuzzy") cast behaviors, we agree the current situation is not ideal. It is inconsistent with the rules of typed function parameters. We added the "Future scope" section to the RFC in this regard: https://wiki.php.net/rfc/nullable-not-nullable-cast-operator#future_scope. This is something we will investigate in the near future. This is fortunately not a blocker to this RFC, as this would address an orthogonal problem. As you said, we have plenty of time before 8.6! — Alexandre Daubois
