<?php
require_once "./classes/benchmark.class.php";
$bm = new benchmark();
?>
<h2>Test Inline Tags vs echo</h2>
<p>
<?php $bm->timer_start('echo'); ?>
<?php
for ($i=0; $i<1000; $i++) {
echo $i."<br>";
}
?>
<?php $bm->timer_stop('echo'); ?>
<p>
<?php $bm->timer_start(str); ?>
<?php
$str = '';
for ($i=0; $i<1000; $i++) {
$str .= $i."<br>";
}
echo $str;
?>
<?php $bm->timer_stop(str); ?>
<p>
<?php $bm->timer_start(inline); ?>
<?php
for ($i=0; $i<1000; $i++) {
?>
123<br>
<?php
}
?>
<?php $bm->timer_stop(inline); ?>
<p>
<br>
<h2>Result</h2>
echo - <?php echo $bm->timer_result('echo'); ?>
<p>
str - <?php echo $bm->timer_result(str); ?>
<p>
inline - <?php echo $bm->timer_result(inline); ?>
|