Quantcast
Channel: Сообщество PHP DevelStudio - среда разработки программ
Viewing all articles
Browse latest Browse all 6336

Функции, скорость.

$
0
0
Почему функция Битча быстрее этой функции?
PHP код:

#Писал я!
function ScanRecursive($__dir){
    
$scan = array();
    
$_dir dir($__dir);
    while (
false !== ($file $_dir->read())){
        if(
$file != '.' and $file != '..')
            if( !
is_file($__dir.'/'.$file)){
                
$scan[] = ScanRecursive($__dir.'/'.$file);
            }else
                
$scan[$file] = $file;
    }
    
$_dir->close();
    return 
$scan;


Измерения папки C:\DevelStudio 3.0 beta:
PHP код:

2.10363197327 моя
0.0777621269226 его 

папка C:\DevelStudio 3.0 beta\core:
PHP код:

0.0105791091919 моя 
0.0119009017944 его 

______________________________

Подскажите плиз

Viewing all articles
Browse latest Browse all 6336

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>