WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : a class that uses microtime() to provide easy calculation of elapsed times
Categories : Date Time, PHP, PHP Classes Update Picture
David Sklar
Date : Jan 17th 1999
Grade : 2 of 5 (graded 8 times)
Viewed : 10922
File : No file for this code example.
Images : No Images for this code example.
Search : More code by David Sklar
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?

class c_Timer {
var $t_start = 0;
var $t_stop = 0;
var $t_elapsed = 0;


function start() { $this->t_start = microtime(); }

function stop() { $this->t_stop = microtime(); }

function elapsed() {
if ($this->t_elapsed) {
return $this->t_elapsed;
} else {
$start_u = substr($this->t_start,0,10); $start_s = substr($this->t_start,11,10);
$stop_u = substr($this->t_stop,0,10); $stop_s = substr($this->t_stop,11,10);
$start_total = doubleval($start_u) + $start_s;
$stop_total = doubleval($stop_u) + $stop_s;

$this->t_elapsed = $stop_total - $start_total;

return $this->t_elapsed;
}
}
};

/* Here's an example usage:

$timer = new c_Timer;

$timer->start();
echo "<hr>";
$timer->stop();

echo $timer->elapsed();

*/
?>



Validator - A PHP class that can can be used for validating Email IDs and Dates
Categories : PHP, PHP Classes, Data Validation, Email, Date Time
A Timing Class
Categories : PHP, PHP Classes, Date Time
Open and Close your website in fixed times .
Categories : PHP, PHP Classes, Cron, Date Time
A time measuring and performance benchmarking class
Categories : PHP, PHP Classes, Testing, Debugging, Date Time
This is now an object, with its interface defined in comments at the beginning of the code. No hooks for graphics yet. I may take some time to do this.
Categories : Date Time, PHP, PHP Classes
A PHP Calendar function with CSS : add a cool calendar to any php page by just adding a calendar class based function.
Categories : PHP, PHP Classes, Calendar, Date Time
pcCalendar class - Allows for the creation of calendars in HTML pages. All output functions can be easily overridden, refer to article 1471 for an example.
Categories : PHP, Date Time, Calendar, PHP Classes
Bs_StopWatch is a class to measure time intervals in microseconds.
Categories : PHP, Date Time, PHP Classes
Example of using the pcCalendar class, article 1468 on weberdev.com. Calendar example.
Categories : PHP, Date Time, PHP Classes, Calendar
Customizable Calendar Class
Categories : HTML and PHP, Date Time, PHP, PHP Classes, Calendar
Client classes for Dictionary servers UPDATED: 2000-06-06
Categories : Network, Search, Complete Programs, PHP Classes, PHP
file class , uploade file , download file already uploaded on another website
Categories : PHP, PHP Classes, Filesystem, Web Services
Authorize.net AIM Interface Class v1.0.0
Categories : PHP, PHP Classes, Ecommerce, Payment Gateways
Class that allows the PHP developer to create and manage UNIX like password files suitable for use as Apache authentication password files.
Categories : HTTP, PHP, PHP Classes, Filesystem
A File Browser Class.To Read Drives,Directories and Files .Files writing is also possible
Categories : PHP, PHP Classes, Filesystem