php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #78518 Why still haven't short syntax / hinting for array/list/assoc/dict?
Submitted: 2019-09-09 10:34 UTC Modified: 2019-09-09 10:38 UTC
From: 6562680 at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 7.2.22 OS: Win10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 6562680 at gmail dot com
New email:
PHP Version: OS:

 

 [2019-09-09 10:34 UTC] 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)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-09 10:38 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: Arrays related +Package: Scripting Engine problem
 [2019-09-09 10:38 UTC] requinix@php.net
Yeah, programming is hard.
 [2019-09-09 10:54 UTC] 6562680 at gmail dot com
W00t?
Is the problem to add typehints?

Python have dicts/cortages
Js has arrays/short_syntax_objects
Java has 'Class[]' return checkers / typehint

Php means - programming is hard 0_o ??

It is feature request. `Not a bug` seems like `Trashed`
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 02:01:33 2024 UTC