<?php
function bcMicroTime() {
return bcadd($temp[0], $temp[1], 6); }
$foreachStart = bcMicroTime();
foreach ($a as $b) {};
$foreachStop = bcMicroTime();
$arraymapStart = bcMicroTime();
$arraymapStop = bcMicroTime();
$timeOverall = bcsub($foreachStop, $foreachStart, 6); echo "foreach execution time - $timeOverall seconds";
$timeOverall = bcsub($arraymapStop, $arraymapStart, 6); echo "\narray_map execution time - $timeOverall seconds";
PD9waHAKCiRhID0gcmFuZ2UoMSwxMDAwMCk7CgpmdW5jdGlvbiBiY01pY3JvVGltZSgpIHsKICAgICR0ZW1wID0gZXhwbG9kZSgiICIsIG1pY3JvdGltZSgpKTsKICAgIHJldHVybiBiY2FkZCgkdGVtcFswXSwgJHRlbXBbMV0sIDYpOwp9CgokZm9yZWFjaFN0YXJ0ID0gYmNNaWNyb1RpbWUoKTsKZm9yZWFjaCAoJGEgYXMgJGIpIHt9OwokZm9yZWFjaFN0b3AgPSBiY01pY3JvVGltZSgpOwoKJGFycmF5bWFwU3RhcnQgPSBiY01pY3JvVGltZSgpOwphcnJheV9tYXAoZnVuY3Rpb24oJGIpIHt9LCAkYSk7CiRhcnJheW1hcFN0b3AgPSBiY01pY3JvVGltZSgpOwoKJHRpbWVPdmVyYWxsID0gYmNzdWIoJGZvcmVhY2hTdG9wLCAkZm9yZWFjaFN0YXJ0LCA2KTsKZWNobyAiZm9yZWFjaCBleGVjdXRpb24gdGltZSAgIC0gJHRpbWVPdmVyYWxsIHNlY29uZHMiOwoKJHRpbWVPdmVyYWxsID0gYmNzdWIoJGFycmF5bWFwU3RvcCwgJGFycmF5bWFwU3RhcnQsIDYpOwplY2hvICJcbmFycmF5X21hcCBleGVjdXRpb24gdGltZSAtICR0aW1lT3ZlcmFsbCBzZWNvbmRzIjs=