Req #78518 [NEW]: Why still haven't short syntax / hinting for array/list/assoc/dict?

From: Date: Mon, 09 Sep 2019 10:34:42 +0000
Subject: Req #78518 [NEW]: Why still haven't short syntax / hinting for array/list/assoc/dict?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222648@lists.php.net to get a copy of this message
From: 6562680 at gmail dot com Operating system: Win10 PHP version: 7.2.22 Package: Arrays related Bug Type: Feature/Change Request Bug description:Why still haven't short syntax / hinting for array/list/assoc/dict? 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 bug report at https://bugs.php.net/bug.php?id=78518&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78518&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78518&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78518&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78518&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78518&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78518&r=support Expected behavior: https://bugs.php.net/fix.php?id=78518&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78518&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78518&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78518&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78518&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78518&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78518&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78518&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78518&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78518&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78518&r=mysqlcfg

« previous php.bugs (#222648) next »