On 5 October 2022 14:42:57 BST, juan carlos morales 
<dev.juan.mora...@gmail.com> wrote:
>Are you facing a situation where manual union type cast is needed?

I can't think of any examples for full union types off the top of my head, but 
nullable casts would frequently be useful, e.g. when you have a value that is 
either a numeric string or null, and you want an integer, but for null to stay 
null, not become zero.

There's also a slightly different case, where you want values which aren't 
numeric to also become null. As I commented on another thread, this is a space 
I've been thinking about recently, and it gets complicated quickly.

Regards,


-- 
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to