HTML Through Paser

I can do you one better I will simply paste the code I used here…

[php]<?php
$start_time = microtime();
for($i = 0; $i < 11; $i++)
{
$form = “”;
$form .="

“;
$form .=” “;
$form .=” ";
$form .=" “;
$form .=” “;
$form .=” “;
$form .=” ";
$form .=" “;
$form .=” “;
$form .=” ";
$form .=" “;
$form .=” “;
$form .=” ";
$form .=" “;
$form .=” “;
$form .=” ";
$form .=" “;
$form .=” “;
$form .=” “;
$form .=” “;
$form .=”
To:“;
$form .=” “;
$form .=” option1";
$form .=" option2";
$form .=" option3";
$form .=" “;
$form .=”
Name:“;
$form .=”
Email:“;
$form .=”
Phone:“;
$form .=”
Comments:“;
$form .=”
  
“;
$form .=” ";
echo "RUN $i: " . “


” . $form;

}
$end_time = microtime();
$run_time = $end_time - $start_time;
echo $run_time . "- RUNNING HTML THROUGH PASER -


";

$start_time = microtime();
for($i = 0; $i < 11; $i++)
{
?>





















To:

option1
option2
option3

Name:
Email:
Phone:
Comments:
  


RUN <? echo $i; ?> :


<?php } $end_time = microtime(); $run_time = $end_time - $start_time; echo $run_time . "- NOT RUNNING HTML THROUGH PASER"; ?>[/php]

0.687343- RUNNING HTML THROUGH PASER
0.00055- NOT RUNNING HTML THROUGH PASER

Which kinda sucks because IMO in-PHP HTML is more readable (to each their own). BUT the tests not running through the parser didn’t finish, they stopped after printing 'RUN 10 : ’ for some reason.

But it’s quite irrelevant to me, as I store my presentation layer (HTML/JS/CSS) in a MySQL table and pull it out through PHP.

Sponsor our Newsletter | Privacy Policy | Terms of Service