Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75162 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23313 invoked from network); 1 Jul 2014 11:48:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2014 11:48:40 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.153 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.153 blu004-omc4s14.hotmail.com Received: from [65.55.111.153] ([65.55.111.153:57152] helo=BLU004-OMC4S14.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/12-03359-610A2B35 for ; Tue, 01 Jul 2014 07:48:38 -0400 Received: from BLU436-SMTP60 ([65.55.111.136]) by BLU004-OMC4S14.hotmail.com with Microsoft SMTPSVC(7.5.7601.22712); Tue, 1 Jul 2014 04:48:35 -0700 X-TMN: [n4RmccOuQiBNepMSR93gMFrErGnQnEIU] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from bobweinandsimac.fritz.box ([88.207.214.175]) by BLU436-SMTP60.smtp.hotmail.com over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384); Tue, 1 Jul 2014 04:48:33 -0700 Content-Type: multipart/alternative; boundary="Apple-Mail=_5B2BE95F-3718-4838-94B3-37DDBBA52FFD" MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: Date: Tue, 1 Jul 2014 13:48:29 +0200 CC: Dmitry Stogov , Andrea Faulds , Xinchen Hui , David Soria Parra , Julien Pauli , PHP Internals References: To: Nikita Popov X-Mailer: Apple Mail (2.1878.2) X-OriginalArrivalTime: 01 Jul 2014 11:48:33.0884 (UTC) FILETIME=[62F761C0:01CF9522] Subject: Re: [PHP-DEV] Wired constant expression syntax and bug From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_5B2BE95F-3718-4838-94B3-37DDBBA52FFD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="windows-1252" Am 1.7.2014 um 13:25 schrieb Bob Weinand : > Not sure if we should check that. That would be adding a new arbitrary = restriction. Now the following works: >=20 > class Foo { > const BAR =3D [ > 3 =3D> =91qux=92, > 4 =3D> =91bang=92, > 7 =3D> =91theta=92, > 9 =3D> =91epsilon=92 > ]; >=20 > const BAZ =3D FOO[4]; > } >=20 > var_dump(Foo::BAZ); Woops, mistake in code=85 written too fast... Should be: class Foo { const BAR =3D [ 3 =3D> =91qux=92, 4 =3D> =91bang=92, 7 =3D> =91theta=92, 9 =3D> =91epsilon=92 ]; const BAZ =3D Foo::BAR[4]; } var_dump(Foo::BAZ); http://3v4l.org/78S2C#v560beta2 Bob --Apple-Mail=_5B2BE95F-3718-4838-94B3-37DDBBA52FFD--