profiler.txt.php 290 B

1234567891011
  1. {:heading}Benchmarks{:end}
  2. <?php
  3. $width = array_reduce(array_keys($data['totals']), function($v, $w) {
  4. return $v = (($l = strlen($w)) > $v) ? $l : $v;
  5. });
  6. foreach ($data['totals'] as $title => $result) {
  7. printf("%-{$width}s %s\n", $title, $result['formatter']($result['value']));
  8. }
  9. ?>