Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Fix code example in README (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdreesen authored Jan 16, 2021
1 parent 3bcd96b commit 790a0c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ $fibonacci = Memoizer::fromClosure($fibonacci);

function bench(Closure $closure, ...$arguments): Generator
{
yield microtime(true);
yield $closure(...$arguments),
yield microtime(true),
$start = microtime(true);
yield $closure(...$arguments);
yield microtime(true) - $start;
}

var_dump(sprintf('[return: %s] [duration: %s]', ...bench($fibonacci, 50)));
Expand Down

0 comments on commit 790a0c3

Please sign in to comment.