Say I had, for example:
<body>
<h1>Title</h1>
<article>
<h2>Article</h2>
<p>Here's a list of some stuff</p>
<ul>
<?php
foreach ($examples as $example) {
echo "<li>" . $example . "</li>";
}
?>
</ul>
</article>
</body>
I know minifying such a file is possible, but my question has more to do with whether or not it is worth doing.
Would minifying the HTML portion of such a file make any performance difference? And if it would, would it still do so if it were used through require('file.php')
rather than a browser asking for file.php
?
And would those performance differences only affect the processing time of the interpreter, or would they also have a difference on the amount of data ultimately sent to the browser?