On 20/09/2022 19:29, Olle Härstedt wrote:
Ya ok, this kills my idea. If heredoc was designed from start so that
the delimiter would not be allowed at all in the text, then it would
make sense. Weird that they did it like that, would be easy enough to
come up with a unique delimiter so that it wou
2022-09-20 17:00 GMT+02:00, Sara Golemon :
> On 19 September 2022 15:24:26 BST, "Olle Härstedt" <
> olle.haerst...@limesurvey.org> wrote:
>>Some editors can guess the domain-specific language inside heredoc, e.g.
> if you do
>>
>>$query = <<>SELECT * FROM foo
>>MySQL;
>>
>>It would be nice if this
2022-09-20 11:54 GMT+02:00, Rowan Tommins :
> On 19/09/2022 20:10, Olle Härstedt wrote:
>> More for users to learn? Don't you mean less, haha? This is an
>> arbitrary limitation of heredoc, that we can remove (it might not be
>> arbitrary from a yacc perspective, someone would have to explain that
On 19 September 2022 15:24:26 BST, "Olle Härstedt" <
olle.haerst...@limesurvey.org> wrote:
>Some editors can guess the domain-specific language inside heredoc, e.g.
if you do
>
>$query = <
On 19/09/2022 20:10, Olle Härstedt wrote:
More for users to learn? Don't you mean less, haha? This is an
arbitrary limitation of heredoc, that we can remove (it might not be
arbitrary from a yacc perspective, someone would have to explain that
if so).
I don't think the rules for heredoc are ar
2022-09-19 21:18 GMT+02:00, Tim Düsterhus :
> Hi
>
> On 9/19/22 21:04, Olle Härstedt wrote:
>> That looks good in isolation, but consider the following short snippet:
>>
>> class Foo
>> {
>> public function bar()
>> {
>> $query = <<> SELECT * FROM baz
>> MySQL;
>> }
Hi
On 9/19/22 21:04, Olle Härstedt wrote:
That looks good in isolation, but consider the following short snippet:
class Foo
{
public function bar()
{
$query = <<
The closing marker of the heredoc may be indented as of PHP 7.3, so the
appropriate comparison would be this:
> While I can't immediately think of a practical problem with this, I'm hesi
> tant at the idea of adding yet more ways of quoting strings; it means more
> for users to learn, more for third party parsers to implement (including ex
> actly the syntax highlighting tools you're going to help), and in
> I don't find that example particularly readable or convincing. It mushes
> together PHP and MySQL keywords too much.
>
> Once you add a WHERE clause that SQL query should be split across
> multiple multiple lines for readability anyway and even for that very
> simple example I personally would ad
Hi
On 9/19/22 16:24, Olle Härstedt wrote:
$query = <<
I don't find that example particularly readable or convincing. It mushes
together PHP and MySQL keywords too much.
Once you add a WHERE clause that SQL query should be split across
multiple multiple lines for readability anyway and even
On 19 September 2022 15:24:26 BST, "Olle Härstedt"
wrote:
>Hi internals!
>
>Some editors can guess the domain-specific language inside heredoc, e.g. if
>you do
>
>$query = <