Re: Happy New Year All!

From: Date: Thu, 31 Dec 2009 17:11:59 +0000
Subject: Re: Happy New Year All!
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-300761@lists.php.net to get a copy of this message
Bipper Goes! wrote:
On Thu, Dec 31, 2009 at 10:52 AM, Robert Cummings <robert@interjinn.com>wrote:
Paul Scott wrote:
Bipper Goes! wrote:
return ThankYou; Oh god I think I blowed it up.
I prefer: <?php while(date('Y') < 2010) ; exit (' Happy New Year');
Oh dear... that's terribly inefficient... Here's a better stab: <?php sleep( strtotime( '2009-12-31 23:59:50' ) - time() ); for( $i = 10; $i >= 0; $i-- ) { echo $i ? "$i...\n" : "HAPPY NEW YEAR!\n"; sleep( 1 ); } ?> Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP
Efficiency, to me, was getting the email out in 15 seconds or less. ;)
Indeed you did nail that one on the head :D

« previous php.general (#300761) next »