Php speed test
Zaman:20-03-2018 04:24
Php hız testi
Php ile hız testi yapmak isteyenler için aşağıdaki kod örnek olabilir: burada basitçe iki değişken atama işlemi gösterilmiştir. FOR döngüsü içine iki farklı işlem yazarak hız farkına bakabilirsiniz.
<?define('DONGU', 10000000);$start = microtime(true);for ($i=0; $i < DONGU; ++$i){ $c ++; }$stop = microtime(true);echo "kısa yazmak: " . ($stop - $start) . " sn<br>";#######################$start = microtime(true);for ($i=0; $i < DONGU; ++$i){ $c = $c + 1; }$stop = microtime(true);echo "uzun yazmak: " . ($stop - $start) . "... Devam?