PHP Classes
elePHPant
Icontem

File: examples/simplestExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Camilo Sperberg  >  Debug Info  >  examples/simplestExample.php  >  Download  
File: examples/simplestExample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Debug Info
Output information about variables and other data
Author: By
Last change:
Date: 10 months ago
Size: 366 bytes
 

Contents

Class file image Download
<?php

include('../src/unreal4u/debugInfo.class.php');

function
myProcess() {
    for (
$i = 0; $i < 200000; $i++) {
       
$j = round($i * 44 + 33 * $i - $i * sqrt(10), 6);
    }

    return
true;
}

$benchmark = new unreal4u\debugInfo('bigProcess');
myProcess();
printf('Total time spent in %s: %.6f', 'bigProcess', $benchmark->endCounter('bigProcess', 'time'));