Skip to content

Instantly share code, notes, and snippets.

@dirk
Created July 27, 2009 17:24
Show Gist options
  • Save dirk/156636 to your computer and use it in GitHub Desktop.
Save dirk/156636 to your computer and use it in GitHub Desktop.
<?php
$now = microtime(true);
for($i = 0; $i < 1000000; $i++){
$str = 2 + 'characters';
}
echo microtime(true) - $now;
$now = microtime(true);
for($i = 0; $i < 1000000; $i++){
$str = 2 . 'characters';
}
echo ' as compared to ';
echo microtime(true) - $now;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment