Bug #67781 [NEW]: Use array() instead of square brackets
| From: | joelm@php.net | Date: | Tue, 05 Aug 2014 17:09:57 +0000 |
| Subject: | Bug #67781 [NEW]: Use array() instead of square brackets | ||
| Groups: | php.standards | ||
| Request: | Send a blank email to standards-+get-335@lists.php.net to get a copy of this message | ||
From: joelm
Operating system:
PHP version: Irrelevant
Package: PHP Language Specification
Bug Type: Bug
Bug description:Use array() instead of square brackets
Description:
------------
https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#array-creation-operator
It might be better to say that "array(..)" is the 'array creation
operator' and mostly use "array(..)" instead of "[..]" in examples. Most
existing PHP code uses "array(..)" way more than "[..]" (because
"[..]"
was added very recently), and I think using "array(..)" as the 'array
creation operator' helps disambiguate it from the subscript operator
("[]").
--
Edit bug report at https://bugs.php.net/bug.php?id=67781&edit=1
--