The following tests execute with PHP 8.3.20
$start = microtime(true);
for ($i = 0; $i < 10000000; $i++) {
$temp = 3 ** 1000;
}
$end = microtime(true);
echo "Exec time = " . ($end - $start) . " Second(s)" . PHP_EOL;
}
>> Exec time = 0.047096014022827 Second(s)
===
$start = microtime(true);
for ($i = 0; $i < 10000000; $i++) {
$temp = pow(3, 1000);
}
$end = microtime(true);
echo "Exec time = " . ($end - $start) . " Second(s)" . PHP_EOL;
}
Exec time = 0.41157102584839 Second(s)