Req #78518 [Opn->Nab]: Why still haven't short syntax / hinting for array/list/assoc/dict?
| From: | requinix@php.net | Date: | Mon, 09 Sep 2019 10:38:17 +0000 |
| Subject: | Req #78518 [Opn->Nab]: Why still haven't short syntax / hinting for array/list/assoc/dict? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222649@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78518&edit=1
ID: 78518
Updated by: requinix@php.net
Reported by: 6562680 at gmail dot com
Summary: Why still haven't short syntax / hinting for
array/list/assoc/dict?
-Status: Open
+Status: Not a bug
Type: Feature/Change Request
-Package: Arrays related
+Package: Scripting Engine problem
Operating System: Win10
PHP Version: 7.2.22
Block user comment: N
Private report: N
New Comment:
Yeah, programming is hard.
Previous Comments:
------------------------------------------------------------------------
[2019-09-09 10:34:42] 6562680 at gmail dot com
Description:
------------
Usually we can get from user (from GET/POST parsers) anything.
Yes, usually we use validators.
But even validators have to know - what is it.
Is it an array? (usually building collections, iterate and so on -> that have numeric incremental
keys ordered by natsort without misses)
Is it an list? (usually PUT requests to batch upload by keys -> that have numeric non-incremental
keys non-ordered, can miss some keys)
Is it an assoc? (usually grouping with arguments unpacking - you can pass string, array, array of
strings, assoc where strings is key and value are bool -> that have at least one string key)
Is it an dict? (usually building an Entity object -> that have only string keys)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78518&edit=1