On Sat, Aug 30, 2014 at 2:33 AM, Tjerk Meesters <tjerk.meest...@gmail.com> wrote:
> Hi internals, > > I would like to propose a few changes to our heredoc / nowdoc scanner to > make it less awkward to use inside other constructs. > > https://wiki.php.net/rfc/heredoc-scanner-loosening > > Let me know your thoughts :) > +1 on removing heredoc/nowdoc restrictions. Having to add a newline after the terminator is very clumsy. We acknowledge this fact by special casing the semicolon, but don't follow through by just removing the requirement. If we allow people to choose their own terminator, they can damn well choose one that causes no conflicts. I mean, what else is the point of this feature? On a technical note, if you go for not removing the restriction entirely, then all characters that are not valid heredoc labels should be allowed afterwards. E.g. your current list misses ) for use in a function call and likely any other number of characters. Nikita