Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118661 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33395 invoked from network); 19 Sep 2022 19:10:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Sep 2022 19:10:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C7448180381 for ; Mon, 19 Sep 2022 12:10:33 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 ; Mon, 19 Sep 2022 12:10:33 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id a3so64942lfk.9 for ; Mon, 19 Sep 2022 12:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=6u+xmBmrLs5B1mpd5gIH4Yr5PK6DJFxdj2TADrEvwQM=; b=eUrMSO6AviDu6pA6vHCmCpe2rmPa3swCATjY2C7PqRsHIAV5DE3FBq9jUa9tWYRBMh vvehNy2zxWCY8dFUa94QSUobXDBcNHvhEC+IinWhnKTOlRqQridIdHnSVnP2WXj4Va3c KBiLRtZ1P4yR2eDQnJ4yr6s0VFhMdg0yK3I9ysrtwVLjHo3VNfuvnsBSSVdOa9hMPmyS NnzgNJZnHcWcORjJAgdowrcQzSdCqFBUkDrCIlSpBAHkyIiGXr3z/WbCpePGe+mXdbfG Xi74HVrrm1F5Hes4eK7FUiIz14WDxK8oFjzd3IrlZXvQE+ko1eRjEWeBaXsY2aCt8Ngl RJkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=6u+xmBmrLs5B1mpd5gIH4Yr5PK6DJFxdj2TADrEvwQM=; b=OL3wEhKVMtT+nfxoTOrWUKS7cKio1Ddeae0jwnQfElFk7LzjKL/UAYSzNO+zf/YH7Y yHE1mc0Vbt8KfKyAnDxZmSDNE3gz1bQcH4qKi87QxjXEKtNzJv5LH4ef51ayCy+zfGYC L0j10b5C2NlRivMuCThYaRj+pbalUPJPkT5+bfMR36s9HNE0ZksCKqVZTAZajf1U/uTo hS6/MkkT7SjLqBmHvYxNz/ZTYnp/o29EHWWFz8r5NDHuAhzGgXHUqAwQPMGgzV0rgNvW SiPg/yckBrk7y8zPNAaRvMbOMfOaNXBEHThPy/WzH/o14DCKaV8w4qTTYLr0QI7ePlAp oZkw== X-Gm-Message-State: ACrzQf0vFseO4cBo9PY6WFW8EzW7KQ8PbeKGqhyqMGF5uZ55u3BRxK6X cbdfNnCHO3mJFjH5at12TlDycs1mVD7l3iBgTQEGM3e1 X-Google-Smtp-Source: AMsMyM4mSM+pcmmDBeWbpRJasm4Dqq+td5UKdAALzpzSXfkMuGs8GSxSOxaLp1E8hfYDg2dKGNRhFyj9nniFplEO8E4= X-Received: by 2002:a19:4f45:0:b0:49a:63c9:190d with SMTP id a5-20020a194f45000000b0049a63c9190dmr6278837lfk.61.1663614631729; Mon, 19 Sep 2022 12:10:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5303:0:0:0:0:0 with HTTP; Mon, 19 Sep 2022 12:10:31 -0700 (PDT) Date: Mon, 19 Sep 2022 21:10:31 +0200 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] One-line heredoc for better syntax highlightning From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) > 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 the worst > case, more edge cases that can lead to security issues 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 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. Olle