Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118658 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21331 invoked from network); 19 Sep 2022 15:58:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Sep 2022 15:58:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 514031804AB for ; Mon, 19 Sep 2022 08:58:40 -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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 19 Sep 2022 08:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1663603118; bh=e4Dz0D+vFxgsBizh93Ma293KkO6hDAyJyFL0e+vVyGQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=UONQaVzL93ba/ugH7o4nC3swxS1ReVcxxXQmpJKLiURPdGlYtRDGpEsyh+fWR0wi7 aq/ZMbFghMPIL5YlmTjlOML9Ko5ap9jL0QTAMWLmeB7/EswDgYt22wlPfjIHn48p8j 7suM0VE2qUE4Z5j+a/B4qejGPGOp2WYrYLbHsMwlPjpe9cLr/0BUVygWl7r79Xy5mQ zK4oufHKDx33H01FbnpBZc0Mtp5oG3H7ikZ1adcjZcHbyl7k4Bw42QhAQfLAyK9pr7 Tve2+L2D9KACb8hVdAK630+IX/QPEqKeG9CTu7gWRSo3szUCluSnn+6xumW3zm1+qC PgP1tCtDbUqVw== Message-ID: <1c8768d0-c3d4-8444-f1fd-02e4bbf26c49@bastelstu.be> Date: Mon, 19 Sep 2022 17:58:37 +0200 MIME-Version: 1.0 Content-Language: en-US To: Internals References: <1835622d2ad.e718af7c86636.4041752759703113661@limesurvey.org> In-Reply-To: <1835622d2ad.e718af7c86636.4041752759703113661@limesurvey.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] One-line heredoc for better syntax highlightning From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 9/19/22 16:24, Olle Härstedt wrote: > $query = << SELECT * FROM foo > MySQL; > > It would be nice if this feature could be used in single lines as well: > > $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 for that very simple example I personally would add a linebreak in front of the FROM: $query = <<