Wrapping a call in two microtime(true) readings looks like a measurement and is mostly noise: one iteration, no warm-up, and the timing includes whatever the loop and the timer themselves cost.
$start = microtime(true);
for ($i = 0; $i < 10000; $i++) {
$result = slugify($input);
}
printf("%.3f ms per calln", (microtime(true) - $start) / 10000 * 1000);
Enough iterations to swamp the timer resolution, and a discarded warm-up pass before the measured one, are the minimum. Beware of the optimisation that makes the benchmark meaningless — assigning to the same variable and never reading it is fine in PHP but not in every language. And measure on the production PHP configuration: benchmarking with Xdebug loaded produces numbers that describe Xdebug.