3 ms·
Three things, mine is PHP 5.6 (Generator), second, I'm only using both 'Fizz' and 'Buzz' once. Maybe you can try to rewrite your code to something similar that
by beardo 12y ago
Three things, mine is PHP 5.6 (Generator), second, I'm only using both 'Fizz' and 'Buzz' once. Maybe you can try to rewrite your code to something similar that concatenates the two strings ;) Last, mine version does not rely on `echo`, it generates a list and uses an foreach to print it.
- zimpenfish 12y agoBut why are these good things in a clearly trivial toy problem? YAGNI, premature optimisation, etc.