- var_dump: documentation ( source)
- microtime: documentation ( source)
- function_exists: documentation ( source)
- round: documentation ( source)
- define: documentation ( source)
<?php
define('KINT_MB', function_exists('mb_substr'));
$time = microtime(true) * 1000;
for ($i = 0; $i < 1000; $i++) {
if (function_exists('mb_substr')) {
}
}
$time1 = microtime(true) * 1000;
for ($i = 0; $i < 1000; $i++) {
if (KINT_MB) {
}
}
$time2 = microtime(true) * 1000;
var_dump(round($time1 - $time));
var_dump(round($time2 - $time1));
var_dump([$time, $time1, $time2]);