Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118669 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86760 invoked from network); 20 Sep 2022 09:55:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Sep 2022 09:55:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D08581804AB for ; Tue, 20 Sep 2022 02:55:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 20 Sep 2022 02:55:04 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id c2-20020a1c3502000000b003b2973dafb7so6520579wma.2 for ; Tue, 20 Sep 2022 02:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date; bh=sOI2kZHng7lxbFgxHc0dXrMBeKw6h88rtAdJn4oHrqI=; b=eOC9aPW8YaVUaGBdKs/eff+U9/3Vzr1d9V5yh4izjPfGVJmKmMgW1TO1IgeCRKr/Ry eb6CFsJ4j6Qhi5p9RfZlch3jPBwr//lC+cXb1qblW/GBEjFCYcE5A7yp0iIY+LSVEGK7 w1zZTQHgR7KH+YL1MOIv6Xl6IiLc3ua43pgUtfqhTyE1Ow27kBlCfrTtxkv6vD+eFz58 2FHAsQIU/2P+xHiXAddD+fYP0qHORBXX7bGIDnKjP5rL1GXIKPOCEDyuIV7yrWNZip2W cmpHDYn4QDBe51wSk+sKkBmwTdZ37W6kXyagytCZnZlq4YBCUSUHu+vI4Ka1pxcZBMGj N+OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date; bh=sOI2kZHng7lxbFgxHc0dXrMBeKw6h88rtAdJn4oHrqI=; b=IRhzrTTcWNaLJhDwM3iQf3qD3NawM0KqGnJFfZbubNP4e/pqvwn7SB/gjiS3DmPvPj qyEHDar3AkqQylxVCPfbM/rufphll4Y9FMKAOuDX99PAPOg94j2Dl8dFlKMWqedH59iC Tiut1FxCgxRo2YfggUHr4iq/WrEY3hkl74x3aOgKFtHs8x4kEPQkIu+c2IEPrg8ZN1lO cAJPqc9qH+df0ZypXM03Ai7fkC5VAXF1zmbxl7/C84/krdYfLPnI/7qOBg7GfmPfiimY 5lgk3i/i9R338v5S7MeIz79uEZukejBnu8w5YtimMF0Zs9HymAUAGVfD1OUaDqyrMlQs fijg== X-Gm-Message-State: ACrzQf28mae9V6X7Aho7Ng1h9/f+rpnk+mQggbZjp4ptFRYq1vIe54ox SQ6xymKFoa19Al0+o53Wmwf6MqC3CUg= X-Google-Smtp-Source: AMsMyM4OMwyfFU/TZX+7QbsAjhhoej0/5xuUlRqoTNKn1uP34v90HTuMzd4st95m79nvF6PkgbkYyQ== X-Received: by 2002:a1c:3842:0:b0:3b4:c1ce:cdaf with SMTP id f63-20020a1c3842000000b003b4c1cecdafmr1686755wma.125.1663667702975; Tue, 20 Sep 2022 02:55:02 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id m28-20020a05600c3b1c00b003a6a3595edasm2126986wms.27.2022.09.20.02.55.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 02:55:02 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------pTgJCsn3fHwd8Aco0leBgx4j" Message-ID: Date: Tue, 20 Sep 2022 10:54:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-GB To: internals@lists.php.net References: In-Reply-To: Subject: Re: [PHP-DEV] One-line heredoc for better syntax highlightning From: rowan.collins@gmail.com (Rowan Tommins) --------------pTgJCsn3fHwd8Aco0leBgx4j Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 arbitrary,  but they are quite specific: the end delimiter has to appear at the *start* of a line, so it can appear anywhere else in the text without prematurely ending the string: $foo = <<> I don't know about other editors, but PhpStorm at least also recognises an >> in-line comment explicitly labelling any string, which if anything seems m >> ore explicit: >> >> $query = /** @lang mysql */"SELECT * FROM foo"; > Pja. I wouldn't call it more or less explicit than heredoc notation, personally. It's more explicit in the sense that it is syntax dedicated for that purpose, in a standard format. If I write <<