Ejemplo n.º 1
0
{
    function go()
    {
        include_once "myinclude.php";
    }
}
class test2
{
    function go()
    {
        echo 'k';
    }
}
$time_start = getmicrotime();
for ($i = 0; $i < 10000; $i++) {
    $bla = new test1();
    $bla->go();
}
echo '<br><br>';
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo 'Page generated in ', number_format($time, 3), ' seconds<br><br><br><br>';
$time_start = getmicrotime();
for ($i = 0; $i < 10000; $i++) {
    $bla = new test2();
    $bla->go();
}
echo '<br><br>';
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo 'Page generated in ', number_format($time, 3), ' seconds<br>';