At the command line, you can:
$ time php foobar.php
Here time
is a built-in bash.
For multiple runs:
$ time for a in {1..10}; do php foobar.php; done real 0m13.042s user 0m0.021s sys 0m0.044s
However, you need to calculate the average time manually.
source share