Login   Register  
PHP Classes
elePHPant
Icontem

File: example3.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marek Szewczyk  >  Stoper  >  example3.php  >  Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: new methods example
Class: Stoper
Measure the time that a script takes to execute
Author: By
Last change:
Date: 2005-03-14 06:16
Size: 1,080 bytes
 

Contents

Class file image Download
<?php
include_once('class.stoper.php');
$s = new Stoper();

$s->AdvStart();

for (
$i 0$i 100000$i++) {
    
$letter chr(rand(97122));
    
$digit  ord($letter);
}

$s->AdvCheckPoint('first loop');

$some      12345.423;
$important 9999;
$variables 'qwertyQWERTY';

$s->AdvCheckPoint('variables initialization');

for (
$i 0$i 100000$i++) {
    
$someText 'Lorem ipsum ('.$some.') dolor sit amet ('.$important.'), consectetuer adipiscing elit. ['.$variables.']';
}

$s->AdvCheckPoint('second loop (single quotes)');

for (
$i 0$i 100000$i++) {
    
$someText "Lorem ipsum (".$some.") dolor sit amet (".$important."), consectetuer adipiscing elit. [".$variables."]";
}

$s->AdvCheckPoint('third loop (doubles quotes with concatenation)');

for (
$i 0$i 100000$i++) {
    
$someText "Lorem ipsum ($some) dolor sit amet ($important), consectetuer adipiscing elit. [$variables]";
}

$s->AdvCheckPoint('fourth loop (doubles quotes)');

$s->AdvStop();

echo 
$s->showAdvResults();
$s->saveAdvResults();
?>