- microtime: documentation ( source)
- test1: documentation ( source)
- test2: documentation ( source)
<?php
function test1() {
$s = microtime(true);
for($i = 0;$i < 1000000; $i++) {
$a = 0b10010111100101001 + 0b11100101001100101;
}
return microtime(true) - $s;
}
function test2() {
$s = microtime(true);
for($i = 0;$i < 1000000; $i++) {
$a = 0123123 + 023454;
}
return microtime(true) - $s;
}
function test3() {
$s = microtime(true);
for($i = 0;$i < 1000000; $i++) {
$a = 0xFAC + 0x234;
}
return microtime(true) - $s;
}
echo test1() . "\n";
echo test2() . "\n";
echo test3() . "\n";