4 ms·
PHP Fizz Buzz solution, any other language solutions?
Hi,
I thought I would try and get a collection of examples of the Fizz Buzz challenge solution in different languages. If you have a solution of this challenge it would be great to see then.
- ColinWright 14y agoHave you tested that? I don't code in PHP, but I'm interested to know what it prints for 15.
- adolfoabegg 14y agoIt returns 15 Look: http://codepad.org/wsNKZ25Q http://codepad.org/wsNKZ25Q
- obayesshelton 14y agosorry my bad, I have updated it.
- deleted 14y ago[deleted]
- RiderOfGiraffes 14y agoI think this should be a good lesson for everyone: don't post code without testing it. There's another point here, though. It seems that you're learning PHP (although in your "About" page you claim that it's one of your skills) so there's no shame in getting things wrong, but aside from learning that you really do need to test even apparently trivial things, it's also good practice to acknowledge other people's contributions, even if only by saying "My thanks to those who pointed out errors in the original." I wouldn't want explicit credit by name, but acknowledging other people is good practice. Look at PG's essays - he regularly thanks people for their feedback.
- obayesshelton 14y agoHi, I would just like to thank RiderOfGiraffes, adolfoabegg and ColinWright for pointing out a really silly mistake on my part. I should of tested my code before posting it, This is why I love the development community always great people to help out.