Re: [PHP-DEV] [RFC] Loosening heredoc/nowdoc scanner

[email protected] (Rowan Collins)
Newsgroups php.internals
Message-ID <[email protected]>
On 30/08/2014 22:26, Robert Williams wrote:
> function foo() {
>     $string = <<<
>        THEEND
>        This is the document text. Any
>        whitespace appearing in a column
>        that’s before the starting token
>        is automatically ignored for all
>        lines.
>     THEEND;

I like this idea, at first glance.

> I’ve not given this solution deep thought, so I’m sure there are problems I’m missing.

The biggest one that comes into my mind is how to define "a column 
that's before the starting token" if there are a mix of tabs and spaces 
involved.

-- 
Rowan Collins
[IMSoP]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.