Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $start = microtime(true);
- echo "Inicio\n";
- $container = fopen($file,'r');
- $array = [];
- while(!feof($container)) {
- if ($linha = fgets($container)) {
- $array[] = $linha;
- }
- }
- echo sprintf("Duração1: %s\n", microtime(true) - $start);
- $start = microtime(true);
- foreach ($array as $linha){
- }
- echo sprintf("Duração2: %s\n", microtime(true) - $start);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement