################################################################################
# $Id: bench.php,v 1.0 2009-04-24 09:30:31 +0200 uwalter Exp $
################################################################################

Title:     PHP performance case study
Copyright: Uwe Walter, Ninja Media Group. All rights reserved.
License:   CC by NC-SA, creativecommons.org
Inspired:  This script was inspired by http://phpbench.com and a few cooled
           bottles of Altenmünster Maibock. But since I'm a Shell and Perl
           programmer too, and I really love it, this one here is a little more
           archaic. No fancy formatting but simple text output. I just want to
           give you the needed information.

           In some cases you will wonder about the results, especially regarding
           the comparison of print() and echo(). There ARE cases, where a print
           is MUCH faster than an echo(). So you cannot simply say echo() IS
           faster than print(). ;-)

Note:      This script, in its actual version, is just the beginning!
           I will continue development as I'll find the time to.
 
Environment:

    httpd: Apache/2.2.22
    PHP:   5.2.17

Description:

    Used for time measurement is the PHP function microtime().

    microtime() returns a string containing a whitespace separated list of two
    elements, where the first is the fractional place and the last are seconds
    as a cut integer. The added string is the unix timestamp with microsends.

Usage:

    Every performance test has to be explicitely activated over passed GET
    parameters. For example if you want to see the microtime test, pass 'time'
    to bench, and so on.

    Example:

        http://ninjaforge.com/php/bench.php?time&for

    To see the complete bench script respectively the available parameters,
    please call:

        http://ninjaforge.com/php/hbench.php

################################################################################
# EOF
################################################################################