- microtime: documentation ( source)
<?php
class Kitchen
{
private $yummy = 'cake';
}
$time_start = microtime(true);
for ($i = 0; $i < 100000; $i += 1) {
$sweetsThief = Closure::bind(function (Kitchen $kitchen) {
return $kitchen->yummy;
}, null, 'Kitchen');
}
echo microtime(true) - $time_start;