Jeff Lacy writes:
> Okay, you are right. I must have missed that sentence. Sorry.
>
> It is a 'good' coding practice (with many people) to indent everything (that
> should be indented, like if's). You can't do a doc quoting inside of an if
> and still maintain 'good' coding practices. That is a bug, in my opinion,
> because you ought to be able to do both perfectly. I understand why the
> developers did what they did, but maybe a compromise could be reached? I
> don't know what that would be, but maybe escaping any stop words before the
> actual stop word with quotes or ticks or something.
That's one for the dev team...I'll re-open the feature request for
that. For me, the one that *needs* to be addressed is the fact that
you can't have anything *after* the terminator; not even a comment
or a space. Give it a shot. :)
> Maybe someone could amend the manual a little bit, like changing "The
> closing identifier must begin in the first column of the line." to "The
> closing identifier must begin in the first column of the line (i.e., you
> can't have anything before the closing identifier)."
I'd agree with this one if the sentence as is could possibly be read
to mean anything else. I think moving that sentence to its own
paragraph would be more likely to call attention to it, without
clouding the issue by restating information. Here's what I just
committed to CVS; it should be up on the site within a couple of days:
Index: phpdoc/en/language/types.xml
diff -u phpdoc/en/language/types.xml:1.16 phpdoc/en/language/types.xml:1.17
--- phpdoc/en/language/types.xml:1.16 Mon Jan 22 16:32:06 2001
+++ phpdoc/en/language/types.xml Wed Feb 21 15:11:56 2001
@@ -192,12 +192,15 @@
Another way to delimit strings is by using here doc syntax
("<<<"). One should provide an identifier after
<literal><<<</literal>, then the string, and then the
- same identifier to close the quotation. The closing identifier
- <emphasis>must</emphasis> begin in the first column of the line.
- The label used must follow the same naming rules as any other
- label in PHP: it must contain only alphanumeric characters and
- underscores, and must start with a non-digit character or
- underscore.
+ same identifier to close the quotation.
+ </simpara>
+
+ <simpara>
+ The closing identifier <emphasis>must</emphasis> begin in the
+ first column of the line. Also, the identifier used must follow
+ the same naming rules as any other label in PHP: it must contain
+ only alphanumeric characters and underscores, and must start with
+ a non-digit character or underscore.
</simpara>
<para>
> Thanks,
>
> Jeff
> ----- Original Message -----
> From: "Bug Database" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 21, 2001 4:38 PM
> Subject: PHP 4.0 Bug #9387 Updated: Doc String Quoting Problem
>
>
> > ID: 9387
> > Updated by: torben
> > Reported By: [EMAIL PROTECTED]
> > Old-Status: Open
> > Status: Bogus
> > Bug Type: Feature/Change Request
> > Assigned To:
> > Comments:
> >
> > This is not a bug. Check the third sentence below, from the PHP Manual at
> http://www.php.net/manual/en/language.types.string.php:
> >
> > Another way to delimit strings is by using here doc syntax ("<<<"). One
> should
> > provide an identifier after <<<, then the string, and then the same
> identifier to
> > close the quotation. The closing identifier must begin in the first
> column of the
> > line. The label used must follow the same naming rules as any other label
> in PHP:
> > it must contain only alphanumeric characters and underscores, and must
> start with
> > a non-digit character or underscore.
> >
> >
> >
> > Previous Comments:
> > --------------------------------------------------------------------------
> -
> >
> > [2001-02-21 17:21:34] [EMAIL PROTECTED]
> > When you are using doc string quoting or something, php doesn't recognize
> the thing that stops it if indented at all or something. There are two
> examples to illistrate my point:
> >
> > echo <<<BARFY
> > This is a good example.
> > It works perfectly.
> > BARFY
> >
> > echo <<<BARFY
> > This is a bad example.
> > It fails miserably.
> > Note the space before BARFY.
> > BARFY
> >
> >
> > Maybe this is a bug, maybe it is a feature. I don't know, but please fix
> it or make note of it in the manual. Thanks.
> >
> > --------------------------------------------------------------------------
> -
> >
> >
> >
> > ATTENTION! Do NOT reply to this email!
> > To reply, use the web interface found at
> http://bugs.php.net/?id=9387&edit=2
> >
--
+----------------------------------------------------------------+
|Torben Wilson <[EMAIL PROTECTED]> Adcore Finland|
|http://www.coastnet.com/~torben http://www.adcore.com|
|Ph: 1.604.709.0506 [EMAIL PROTECTED]|
+----------------------------------------------------------------+
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]