PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Rahman Haghparast   timing class   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample file using timing.class.php
Class: timing class
Measuring the time that code takes to run
Author: By
Last change:
Date: 21 years ago
Size: 389 bytes
 

Contents

Class file image Download
<?php
include "timing.class.php";
$timer=new timing;
echo
"echo() function: ";
$timer->start();
echo
"testing the time required to execute function: ";
$timer->stop();
echo
$timer->get_time()." seconds";
echo
"<br>";
echo
"print() function: ";
$timer->start();
print
"testing the time required to execute function: ";
$timer->stop();
print
$timer->get_time()." seconds";
?>