note 123533 added to language.types.string

From: Date: Sat, 19 Jan 2019 14:53:56 +0000
Subject: note 123533 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-210080@lists.php.net to get a copy of this message
With the nowdoc syntax, even backslashes are treated literally and should not be escaped. This lends itself to, for example, producing translation files, e.g. <?php class English { const ABOUT_SLASHES = <<<'END_TEXT' Usually in PHP, backslashes (\) in strings should be escaped with another backslash (i.e. \\), but this is not the case with the nowdoc syntax. END_TEXT; } ?> ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.194 (proxied: 87.113.49.43) ---- Manual Page -- http://php.net/manual/en/language.types.string.php Edit -- https://master.php.net/note/edit/123533 Del: integrated -- https://master.php.net/note/delete/123533/integrated Del: useless -- https://master.php.net/note/delete/123533/useless Del: bad code -- https://master.php.net/note/delete/123533/bad+code Del: spam -- https://master.php.net/note/delete/123533/spam Del: non-english -- https://master.php.net/note/delete/123533/non-english Del: in docs -- https://master.php.net/note/delete/123533/in+docs Del: other reasons-- https://master.php.net/note/delete/123533 Reject -- https://master.php.net/note/reject/123533 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210080) next »