Re: RFC: Short syntax for Arrays (redux)

From: Date: Wed, 01 Jun 2011 11:49:46 +0000
Subject: Re: RFC: Short syntax for Arrays (redux)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-52659@lists.php.net to get a copy of this message
Em Tue, 31 May 2011 19:42:18 +0100, Brian Moon <brian@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

« previous php.internals (#52659) next »