Subdomain Posts
PHP | 2 days ago
PHP | 159 days ago
PHP | 161 days ago
PHP | 196 days ago
PHP | 208 days ago
PHP | 249 days ago
PHP | 431 days ago
PHP | 477 days ago
PHP | 567 days ago
PHP | 567 days ago
Recent Posts
Java | 5 sec ago
PHP | 38 sec ago
PHP | 44 sec ago
Python | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
Bash | 3 min ago
JavaScript | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Sam Yong on the 23rd of Aug 2009 11:37:49 PM Download | Raw | Embed | Report
  1. <?php
  2.  
  3. $a = array();
  4. $i = 0;
  5. while($i++ < 1000){
  6. $a[] = dechex(crc32(microtime_float()));
  7. }
  8.  
  9. $i = 0;
  10. $time_start = microtime_float();
  11. while($i++<1000){
  12. $b = $a[count($a)-1];
  13. }
  14. $time_end = microtime_float();
  15. $loadedin = (float)($time_end - $time_start);
  16. echo $loadedin.' s<br/>';
  17.  
  18. $i = 0;
  19. $time_start = microtime_float();
  20. while($i++<1000){
  21. $c = end($a);
  22. }
  23. $time_end = microtime_float();
  24. $loadedin = (float)($time_end - $time_start);
  25. echo $loadedin.' s<br/>';
  26. echo $b.'<br/>'.$c;
  27.  
  28. function microtime_float(){
  29.     list($usec, $sec) = explode(" ", microtime());
  30.     return ((float)$usec + (float)$sec);
  31. }
  32.  
  33. ?>
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: