Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35685 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90530 invoked by uid 1010); 21 Feb 2008 12:07:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90515 invoked from network); 21 Feb 2008 12:07:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 12:07:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:48507] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/50-21621-F696DB74 for ; Thu, 21 Feb 2008 07:07:13 -0500 Received: from [192.168.3.87] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTP id 50D7C6401EA; Thu, 21 Feb 2008 15:07:08 +0300 (MSK) Message-ID: <47BD6963.3030803@daylessday.org> Date: Thu, 21 Feb 2008 15:06:59 +0300 User-Agent: Thunderbird 2.0.0.9 (X11/20071114) MIME-Version: 1.0 To: Sebastian CC: internals@lists.php.net References: <80.CB.30965.DF4ACB74@pb1.pair.com> In-Reply-To: <80.CB.30965.DF4ACB74@pb1.pair.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] string operators for assigning class constants From: tony@daylessday.org (Antony Dovgal) On 21.02.2008 01:08, Sebastian wrote: > hi, > > why isn't it possible to assign class constants like this: > > class test > { > const > DIR='dirname'.DIRECTORY_SEPARATOR.'anotherdirname'.DIRECTORY_SEPARATOR; > } Because concatenating is an expression, expressions are executed in runtime (2nd stage) and classes are declared in compile-time (1st stage). -- Wbr, Antony Dovgal