On 24/01/2020 19:27, Mike Schinkel wrote:
ALLOW the use of a syntax for typed arrays — whether it be type[] or [type] — but only 
validate that it is an array and that the "type" is in fact a type, but don't 
actually validate that each element is the correct type.


I don't really see much point in that. Tools are happily reading this information from docblocks already, so all I can see this achieving is:

1) Misleading users into thinking the language will guarantee something when it won't. 2) Making it harder to use that syntax for a different purpose later, because code will be out there which lists such constraints but violates them, and will suddenly fail if the checks are enforced.

Regards,

--
Rowan Tommins (né Collins)
[IMSoP]

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

Reply via email to