Hiya,

There are two reasons that I can pick up that you may be experiencing this
area:
1) You are not using PHP4 or later
2) you are using windoze and.....

"Probably the nastiest gotcha is that there may also not be a carriage
return (\r) at the end of the line, only a form feed, AKA newline (\n).
Since Microsoft Windows uses the sequence \r\n as a line terminator, your
heredoc may not work if you write your script in a Windows editor. However,
most programming editors provide a way to save your files with a UNIX line
terminator."
(http://www.php.net/manual/sv/printwn/language.types.string.php#language.typ
es.string.syntax.heredoc)

It doesnt matter whether you use EOD or EOT or any other (naming convention
compliant) identifier.

I hope this helps,

Todd.

> -----Original Message-----
> From: Voisine [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 3 September 2002 3:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: unexpected T_SL
>
>
> Your lucky :) because I'm using the same version and I have this
> parse error.
>
> Erwin wrote:
>
> > Voisine wrote:
> > > Hi,
> > >
> > > What is wrong witht his code? Parse error: parse error, unexpected
> > > T_SL in c:\program files\easyphp\www\tutorial\eod.php on line 2
> > >
> > > <?php
> > > $str = <<<EOD
> > > Example of string
> > > spanning multiple lines
> > > using heredoc syntax.
> > > EOD;
> > > ?>
> >
> > To be honest, there is nothing wrong. It works in version 4.2.2
> (at least,
> > here it does) ;-))
> >
> > Grtz Erwin
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to