Issue: Currently the format for nullable function parameters is as
follows: `fn(?int $param)`; this makes little visual sense from an
outside perspective. What does the `?` mean? PHP does not have a `?`
data type; it is very visually ambiguous.

Suggestion: `fn(null|int $param)`. This uses the same syntax format
that other logic constructs in the language use as well as being very
explicit to the data types allowed for the parameter. For the moment
only `null|{one other data type}` would be the goal of the RFC;
however in future iterations multiple data types could be allowed.

Gauge initial interest in a alteratio of this type, thanks for your time.

David E.

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

Reply via email to