I want to factor out large pieces boilerplate HTML into separate files and I'm looking for the fastest way to place the entire contents of the file in the page to be served.
An obvious way to do it is simply
echo ( file_get_contents ( "boilerplate.html" );
Another way to do this would be to make the boilerplate as executable PHP, boilerplate.php:
echo "<ul>\n",
" <li>one</li>\n",
" <li>two</li>\n",
" <li>three</li>\n",
"</ul>\n";
and then just include ("boilerplate.php");
Anybody know which technique is faster, or if there's another option that might be faster? I know I could build my own simple test case, but if anybody knows the answer...
Thanks.