Guest User

Untitled

a guest
May 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. $start = time(NULL);
  3. error_reporting(~E_ALL);
  4.  
  5. $file = file_get_contents("blabla.txt");
  6. $pieces = explode("\n", trim($file));
  7.  
  8. foreach($pieces as $piece)
  9. {
  10. if(strcmp($piece, "textthatexistsinthefile") == 0)
  11. {
  12. echo 'yes';
  13. }
  14.  
  15. }
  16.  
  17. $end = time(NULL);
  18.  
  19. echo 'time '.$end - $start;
  20.  
  21. ?>
Add Comment
Please, Sign In to add comment