Em Tue, 31 May 2011 19:42:18 +0100, Brian Moon <br...@moonspot.net> escreveu:

https://wiki.php.net/rfc/shortsyntaxforarrays


-1

I see very little benefit, specially in my keyboard layout, where typing [ and ] requires pressing Alt Gr + 8/9.

Plus, it can cause confusion because [] is currently used for array dereference.

For instance:


<?php
class A implements ArrayAccess {
function offsetSet($offset, $value) {}
function offsetExists($offset) {}
function offsetUnset($offset) {}
function offsetGet($offset) { var_dump($offset); }
}
$a = new A;
$a[array()];

is much more clear than

$a[[]]

--
Gustavo Lopes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to