php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #48266 shorthand for array keryword
Submitted: 2009-05-13 19:57 UTC Modified: 2009-05-13 22:26 UTC
From: zyss at mail dot zp dot ua Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.9 OS: Irrelevant
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: zyss at mail dot zp dot ua
New email:
PHP Version: OS:

 

 [2009-05-13 19:57 UTC] zyss at mail dot zp dot ua
Description:
------------
One of the most frequently used keywords in PHP is "array".
It would be great to adopt just another construct from C/C++, namely array constructor using curly brackets { }.
These are cases when PHP code is oversaturated with "array" word.
In this way it would be much easier to write and read PHP code.

I am aware of case #3928 and http://wiki.php.net/rfc/shortsyntaxforarrays, but I think that curly brackets would be more suitable than square brackets.

Noone seems to complain of how C/C++ arrays are constructed.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-13 22:26 UTC] johannes@php.net
{} would create simpler lead to conflicts for the parser, but semantics will be discussed when this feature will be discussed the next time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 18:01:32 2024 UTC