Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26943 invoked by uid 1010); 5 May 2004 20:42:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26918 invoked from network); 5 May 2004 20:42:55 -0000 Received: from unknown (HELO theta.altoona-pa.com) (209.161.72.28) by pb1.pair.com with SMTP; 5 May 2004 20:42:55 -0000 Received: from ionzoft-jeg.ionzoft.com (dpvc-207-68-114-163.alt.east.verizon.net [207.68.114.163]) by theta.altoona-pa.com (Postfix) with ESMTP id 25BBC14120 for ; Wed, 5 May 2004 16:42:55 -0400 (EDT) Message-ID: <5.1.0.14.0.20040505164239.00b8e398@mail.ionzoft.com> X-Sender: izftjason@mail.ionzoft.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 05 May 2004 16:43:11 -0400 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] constant name From: jason@ionzoft.com (Jason Garber) Does it output "barfoo" or "bar"? ~Jason At 5/5/2004 10:01 PM +0200, Mehdi Achour wrote: Hi ! The manual reads : "The name of a constant follows the same rules as any label in PHP. A valid constant name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thusly: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]'" I know that this is true when trying to echo a constant directly, as the parser raise an error, but you can trick it with a constant() call :