note 123693 deleted from language.basic-syntax.phptags by cmb
| From: | cmb@php.net | Date: | Sat, 24 Aug 2019 11:26:23 +0000 |
| Subject: | note 123693 deleted from language.basic-syntax.phptags by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211960@lists.php.net to get a copy of this message | ||
Note Submitter: pl at dot pl
----
Omit closing tag ?> always whenever you can
example:
<!DOCTYPE html><head>
<title><?php include'varia.php'; echo$title?></title>
</head><body></body></html>
varia.php
<?php
$title = 'Welcome';
?>
[new line] //other words: an extra 'Enter' is guilty
---------------
and you get:
ï¼Welcome - at the browser label
source won't tell you what happened - there will be fine:
<!DOCTYPE html><head>
<title>Welcome</title>
</head><body></body></html>
Now imagine, what else can go wrong because of it? Everything, as Murphy said.
And you will look for the answer why...? And where...?
It's just simplest example.