2 ms·
I personally think it looks broken and wrong. For short strings I don't see the point and for multiline strings, use a heredoc.
by iforgotpassword 5y ago
I personally think it looks broken and wrong. For short strings I don't see the point and for multiline strings, use a heredoc.
- vessel 5y agoThe reason I never use Heredoc is because you need to abandon your indentation, otherwise your tabs/spaces get included in the string. Is there a way around that?
- deleted 5y ago[deleted]
- mrcarrot 5y agoNot since PHP 7.3![1] If you indent the closing identifier, then the corresponding indentation will be removed from the content of the heredoc string. [1]: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc https://www.php.net/manual/en/language.types.string.php#lang...
- TrispusAttucks 5y agoI thought they fixed this with [1] Flexible Heredoc in 2017 with PHP 7.3 [1] https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes