foreach ( $benchs as $bench ) {
// handle empty args
if ( !array_key_exists( 'args', $bench ) ) {
- $bench['args'] = array();
+ $bench['args'] = [];
}
$bench_number++;
$bench['function'] = $ret;
}
- $this->results[$bench_number] = array(
+ $this->results[$bench_number] = [
'function' => $bench['function'],
'arguments' => $bench['args'],
'count' => $count,
'delta' => $delta,
'average' => $delta / $count,
- );
+ ];
}
}
$ret .= sprintf( "%s times: function %s(%s) :\n",
$res['count'],
$res['function'],
- join( ', ', $res['arguments'] )
+ implode( ', ', $res['arguments'] )
);
$ret .= sprintf( " %6.2fms (%6.2fms each)\n",
$res['delta'] * 1000,