Skip to content

Instantly share code, notes, and snippets.

@phawk
Created April 18, 2011 11:40
Show Gist options
  • Save phawk/925170 to your computer and use it in GitHub Desktop.
Save phawk/925170 to your computer and use it in GitHub Desktop.
<?php
$start = microtime();
$x = 1;
do{
$x++;
$result = null;
$i = 0;
do{
$i++;
$result .= ( $i % 3 === 0 ? ($i % 5 === 0 ? 'Fizz Buzz<br />' : 'Fizz<br />' ) : ($i % 5 === 0 ? 'Buzz<br />' : $i . '<br />' ) );
} while( $i < 100);
echo $result;
} while( $x < 100 );
$end = microtime();
$total = $end - $start;
echo 'Total: ' . $total;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment