On 12/02/2020 18:20, Niklas Keller wrote:
Type Safety
I think the API should be type safe. Currently $request->get['key']
can be null | string | string[] | ... Most parameters only appear a
single time, so a method returning the first parameter value or null
could be used instead.
I may be misunderstanding what you're suggesting here, but it seems
you're proposing to have ->get['key'] only return null|string, getting
rid of the arrays of parameter values ( ?key[]=value1&key[]=value2 )
functionality here. (And I assume you intend the same for ->post['key'] )
If so, I would say this is a bad idea. I and a lot of other devs use
this functionality frequently (more often in POST, but often enough in
GET for purposes such as search pages). And how would multiple select
inputs be handled?
AllenJB
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php