Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35024 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89265 invoked by uid 1010); 30 Jan 2008 14:45:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89250 invoked from network); 30 Jan 2008 14:45:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2008 14:45:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=jochem@iamjochem.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jochem@iamjochem.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and error) X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.6 Received: from [194.109.193.121] ([194.109.193.121:56603] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/E0-14302-D9D80A74 for ; Wed, 30 Jan 2008 09:45:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 791AC27DA8D; Wed, 30 Jan 2008 15:45:45 +0100 (CET) X-Virus-Scanned: amavisd-new at moulin.nl Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (mx1.moulin.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VMHaPs7q5aOz; Wed, 30 Jan 2008 15:45:41 +0100 (CET) Received: from [192.168.1.10] (bspr.xs4all.nl [194.109.161.228]) by mx1.moulin.nl (Postfix) with ESMTP id 0CE9C27A3DF; Wed, 30 Jan 2008 15:45:41 +0100 (CET) Message-ID: <47A08D95.10305@iamjochem.com> Date: Wed, 30 Jan 2008 15:45:41 +0100 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Pierre Joye CC: Antony Dovgal , Dmitry Stogov , Stanislav Malyshev , PHP Internals References: <479114FD.6010005@zend.com> <47A07E86.4010008@zend.com> <47A08314.60507@daylessday.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] nowdocs again From: jochem@iamjochem.com (Jochem Maas) Pierre Joye schreef: > On Jan 30, 2008 3:00 PM, Antony Dovgal wrote: >> On 30.01.2008 16:41, Dmitry Stogov wrote: >>> The final nowdoc patches are attached. >>> I'm going to commit them on Thursday in case of no objections. >> So the current syntax is >> >> $var = <<<'TEXT' >> text >> 'TEXT'; >> >> am I right? >> >> I believe it's far from readable and clear and I suggest not to add it until >> we have a better syntax. > > What do you suggest? :) someone suggested this: $s = <<<~TEXT foo bar qux TEXT; which does seem more readable and/or less confusing than quoting the delimter. or maybe use an unbalanced single quote: $s = <<<'TEXT foo bar qux TEXT; which could have a complement of $s = <<<"TEXT foo bar qux TEXT; the '"' being optional and having the same meaning as heredoc syntax as it stands now. having an unbalanced quote would leave less room for someone to ask why a string literal was used (because it's not a string literal without the second quote), additionally using single/double quote identifiers likens the here* syntax to the behaviour of single and double quoted strings with regard to variable interpolation. just a thought. > >> Also looking at the discussion, I can see only 6 people involved (including Dmitry), >> which most likely means nobody is really interested in that "nowdoc" and this is >> yet another reason not to add it. >> >> P.S. I personally see no need in such thing at all. > > I'm pretty sure there is more people interested. I find nowdoc very > handy and is the perfect complement to heredoc. >