Advertisement
Guest User

Case-Sensitive Alphanumeric Increment Function

a guest
Dec 11th, 2010
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. $time = microtime(true);
  4.  
  5. $x = 10000000;
  6.  
  7. $string = '://aoeuaosreducraouasrocduouhecudsroeudraoheucoreuoeu';
  8.  
  9. for ($i = 0; $i < $x; $i++) {
  10.     if (strpos($string, 'http') === 0) {
  11.     }
  12. }
  13.  
  14. echo ((microtime(true) - $time) / $x) . PHP_EOL;
  15.  
  16. $time = microtime(true);
  17.  
  18. for ($i = 0; $i < $x; $i++) {
  19.     if (substr($string, 0, 4) == 'http') {
  20.     }
  21. }
  22.  
  23. echo ((microtime(true) - $time) / $x) . PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement