Re: Union type casts
| From: | juan carlos morales | Date: | Wed, 05 Oct 2022 13:42:57 +0000 |
| Subject: | Re: Union type casts | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118753@lists.php.net to get a copy of this message | ||
There is a difference is declaring a function parameter of different
types ... because before hand, when the code calls the function, we
might not be sure about what kind if data the function will receive,
so the function could expect different types, and work the parameter
correctly internally..... nice
but ... when casting, on purpose, what use case can apply to it?
Are you facing a situation where manual union type cast is needed? can
you share it with us?
thanks