Un script assez simple, cependant je n'ai pas reconfiguré mon php(je ne l'ai fais que rarement pour le temsp d'exécution...) alros bon...
"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 558 bytes) in /home/florent/www/tests/benchmark/bm_if.php on line 18"
Mon serveur ne supporte pas les 1.000.000 de tests...
Voici un exemple de script:
"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 558 bytes) in /home/florent/www/tests/benchmark/bm_if.php on line 18"
Mon serveur ne supporte pas les 1.000.000 de tests...
Voici un exemple de script:
Code PHP :
<?php
ini_set("max_execution_time",0);
include("includes/functions.php");
$FileToInclude = 'vars.php';
$DayTime = $Dif = array();
$TestNb = 1000000;
for($i=1; $i<=$TestNb; $i++) {
$DayTime[0] = gettimeofday();
if(1 == 0) {
}
$DayTime[1] = gettimeofday();
$DayTime[0]['MegaUsec'] = $DayTime[0]['sec']*1000000 + $DayTime[0]['usec'];
$DayTime[1]['MegaUsec'] = $DayTime[1]['sec']*1000000 + $DayTime[1]['usec'];
$Dif[$i] = $DayTime[1]['MegaUsec'] - $DayTime[0]['MegaUsec'];
}
$Average = array_sum($Dif)/$TestNb;
echo "Moyenne= $Average<br />";
?>