note 55894 deleted from ref.datetime by victor

From: Date: Wed, 17 Aug 2005 08:05:12 +0000
Subject: note 55894 deleted from ref.datetime by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-93781@lists.php.net to get a copy of this message
Note Submitter: vladson at pc-labs dot info ---- Don't remember why i wrote this, but in case someone needs it... <? /*********************************************************** * Funny benchmark * Calculating "PI" for 29sec * * Author: Vladson <vladson@pc-labs.info> * Web-site: http://vladson.pc-labs.info/ ***********************************************************/ header('Content-type: text/plain; charset=iso-8859-1'); $a = 3; for ($i=0; $i<30; $i++) { $time = time()+1; while ( $time <> time() ) { $b += ( 1 / $a ) - ( 1 / ( $a + 2 ) ); $a +=4; } echo 4*(1-$b) . "\n"; } echo $a; /**********************************************************/ ?>

« previous php.notes (#93781) next »