$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
$b;
}
echo microtime_float() - $bm;
0.13535499572754
$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
isset($b);
}
echo microtime_float() - $bm;
0.12668704986572
$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
!empty($b);
}
echo microtime_float() - $bm;
0.14148497581482
$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
$a;
}
echo microtime_float() - $bm;
0.096091032028198
$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
isset($a);
}
echo microtime_float() - $bm;
0.14264321327209
$bm = microtime_float();
for ($a = 0; ++$a < 1000000;) {
!empty($a);
}
echo microtime_float() - $bm;
0.15884304046631
Nota: Este servidor corre PHP 4, por lo que se definió microtime_float como en el ejemplo 447