Re: RFC: Short syntax for Arrays (redux)
| From: | Michael Shadle | Date: | Wed, 01 Jun 2011 22:17:45 +0000 |
| Subject: | Re: RFC: Short syntax for Arrays (redux) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52715@lists.php.net to get a copy of this message | ||
On Wed, Jun 1, 2011 at 3:09 PM, Sean Coates <sean@seancoates.com> wrote:
> This is not about saving five characters every time I type array(), it's about making my
> systems all work together in a way that's a little less abstracted, and a lot less prone to
> error.
Why not make your data in JSON and then $foo = json_encode($data) ?
Why try to adopt JSON to PHP, just so it matches another language's format?
You do realize adding JavaScript syntax for arrays will only make that
consistent with JavaScript, otherwise you're still coding PHP with PHP
syntax, functions, etc. for everything else. That argument seems moot.
If you're more comfortable with JavaScript, start developing in node
if that is your cup of tea.