One-line heredoc for better syntax highlightning
| From: | Olle Härstedt | Date: | Mon, 19 Sep 2022 14:24:26 +0000 |
| Subject: | One-line heredoc for better syntax highlightning | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-118655@lists.php.net to get a copy of this message | ||
Hi internals!
Some editors can guess the domain-specific language inside heredoc, e.g. if you do
$query = <<<MySQL
SELECT * FROM foo
MySQL;
It would be nice if this feature could be used in single lines as well:
$query = <<<MySQL SELECT * FROM foo MySQL;
Any limitations in the parser that prevents this? Or just a convention or historical choice?
Olle Härstedt
Software Developer (Chief Software Architect)
tel:+49 40 22660066
mailto:olle.hearstedt@limesurvey.org
https://www.limesurvey.org
LimeSurvey GmbH
Papenreye 63
22453 Hamburg
Sitz der Gesellschaft / trade register: Hamburg, Amtsgericht Hamburg HRB 137625
Steuernummer / tax id: 49 / 740 / 01441
https://www.limesurvey.org
https://www.facebook.com/LimeSurvey/
https://twitter.com/LimeSurvey
https://www.linkedin.com/company/limesurvey
https://www.xing.com/companies/limesurveygmbh
https://github.com/LimeSurvey/LimeSurvey