Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55767 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29868 invoked from network); 9 Oct 2011 17:14:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2011 17:14:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:61507] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/D6-15867-196D19E4 for ; Sun, 09 Oct 2011 13:14:58 -0400 Received: by eyg7 with SMTP id 7so585206eyg.29 for ; Sun, 09 Oct 2011 10:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=yVcZupT/pdXocaB5cBbMk+ntMrAnmL1Aqn6nTslPJ68=; b=gBdtgibSJcge0wpDnCjpG7peaa2V8PTGolQRzSJoiAcr+8ekHJ72m4IZG96qD1oO0Q 9zSSvUT+hRQMP/SNGcq4KrlVH6zhZ9xSYg5fb3Tn6LK+0YTRUOikSdc3202G9/SuKMj+ VzK1oFGdUwK99TGqUQeyBhdTXlGuvjTqVBevk= MIME-Version: 1.0 Received: by 10.14.8.204 with SMTP id 52mr1250971eer.160.1318180494703; Sun, 09 Oct 2011 10:14:54 -0700 (PDT) Received: by 10.14.99.205 with HTTP; Sun, 9 Oct 2011 10:14:54 -0700 (PDT) Date: Sun, 9 Oct 2011 19:14:54 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: [PHP-DEV] Array dereferencing using alternative array syntax From: nikita.ppv@googlemail.com (Nikita Popov) Hi list! PHP 5.4 added array dereferencing support (e.g. `func()[1]`), but the grammar seems to lack support for dereferencing using the alternative array access syntax (e.g. `func(){1}`). Was this done on purpose or was it just forgotten? Some links: http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#array_function_dereference http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#array_method_dereference http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#reference_variable (example of grammar with alternative syntax) Nikita