languages
languages copied to clipboard
Simplify PHP code for fibonacci
I have:
- [x] Read the project README, including the benchmark descriptions
- [x] Read the PR template instructions before I deleted them
- [x] Understood that if I have changed something that could impact performance of one or more contributions, I should provide results benchmark runs, using the
run.shscript, from before and after the change.
Description of changes
~First a == comparison is slower than a === comparison. As we have match now, we can simplify the code, and as match() is a === comparison (equality) teorically need to be faster.~
Use $n < 2 only 1 comparison like in other languages. So it's faster.