> Le 31 juil. 2018 à 21:07, Sara Golemon <poll...@php.net> a écrit :
>
>> On Tue, Jul 31, 2018 at 2:23 PM, David Rodrigues <david.pro...@gmail.com>
>> wrote:
>> Currently we have support to (int) cast (and similar). But I do think that
>> we too need a possibility to do a nullable cast. In terms, it will cast to
>> (int) only if value is not null, else it should be kept as null.
>>
> I like this proposal. Short, simple, and consistent with other parts
> of PHP syntax. Write up an RFC for it?
>
> -Sara
>
And, please, also consider `settype($x, '?int')`.
I have userland functions in my code for those type of casts.
—Claude
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php