note 118827 added to language.basic-syntax.phptags

From: Date: Fri, 12 Feb 2016 10:49:15 +0000
Subject: note 118827 added to language.basic-syntax.phptags
Groups: php.notes 
Request: Send a blank email to php-notes+get-204925@lists.php.net to get a copy of this message
Regarding earlier note by @purkrt : > I would like to stress out that the opening tag is "<?php[whitespace]", not just > "<?php" This is absolutely correct, but the wording may confuse some developers less familiar with the extent of the term "[whitespace]". Whitespace, in this context, would be any character that generated vertical or horizontal space, including tabs ( \t ), newlines ( \n ), and carriage returns ( \r ), as well as a space character ( \s ). So reusing purkrt's example: <?php/*blah*/ echo "a"?> would not work, as mentioned, but : <?php /*php followed by space*/ echo "a"?> will work, as well as : <?php /*php followed by end-of-line*/ echo "a"?> and : <?php /*php followed by tab*/ echo "a"?> I just wanted to clarify this to prevent anyone from misreading purkrt's note to mean that a the opening tag --even when being on its own line--required a space ( \s ) character. The following would work but is not at all necessary or how the earlier comment should be interpreted : <?php /*php followed by a space and end-of-line*/ echo "a"?> The end-of-line character is whitespace, so it is all that you would need. ---- Server IP: 72.52.91.14 Probable Submitter: 70.114.219.49 ---- Manual Page -- http://php.net/manual/en/language.basic-syntax.phptags.php Edit -- https://master.php.net/note/edit/118827 Del: integrated -- https://master.php.net/note/delete/118827/integrated Del: useless -- https://master.php.net/note/delete/118827/useless Del: bad code -- https://master.php.net/note/delete/118827/bad+code Del: spam -- https://master.php.net/note/delete/118827/spam Del: non-english -- https://master.php.net/note/delete/118827/non-english Del: in docs -- https://master.php.net/note/delete/118827/in+docs Del: other reasons-- https://master.php.net/note/delete/118827 Reject -- https://master.php.net/note/reject/118827 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204925) next »