- microtime: documentation ( source)
- pow: documentation ( source)
<?php
$start = microtime(true);
for ($i = 0; $i < 10000000; $i++) {
2 ** 16;
}
echo "Pow operator: " . (microtime(true) - $start) . "\n";
$start = microtime(true);
for ($i = 0; $i < 10000000; $i++) {
pow(2, 16);
}
echo "Pow function: " . (microtime(true) - $start) . "\n";