Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1457 invoked from network); 27 Jul 2014 08:55:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2014 08:55:33 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.91 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.91 smtp91.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.91] ([108.166.43.91:48274] helo=smtp91.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/5F-22380-38EB4D35 for ; Sun, 27 Jul 2014 04:55:33 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp12.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id B24A8807B0; Sun, 27 Jul 2014 04:55:38 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp12.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 1E7C3807C3; Sun, 27 Jul 2014 04:55:38 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.10); Sun, 27 Jul 2014 08:55:38 GMT Message-ID: <53D4BE89.6030606@sugarcrm.com> Date: Sun, 27 Jul 2014 01:55:37 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Nikita Popov CC: Julien Pauli , Dmitry Stogov , Bob Weinand , PHP Internals References: <53D42583.9070201@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Weird constant expression syntax and bug From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Yes, I agree that this is not correct behavior - and I don't really > understand why it was introduced and why it isn't trivial to fix. > PHP-5.5 had a check for this case in place > (http://lxr.php.net/xref/PHP_5_5/Zend/zend_compile.c#7071) and phpng > contains an AST-compatible variant of the array check > (http://lxr.php.net/xref/phpng/Zend/zend_compile.c#7776). Shouldn't > copying the condition from phpng into PHP-5.6 resolve this issue? I agree it should be easy to fix it this way, but I'd like for Bob to provide a bit more input here as to best way to resolve it. I'm not sure why usage of arrays in runtime is disallowed now in 5.6 code, so I'm not sure if we should enable it or remove it. If we don't find another way soon, I guess porting one from phpng is what we'll have to do. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/