As part of an ongoing conversation where I work, I have been advocating for the use of Go moving forward. The biggest competitor is PHP, due primarily to its use in our largest existing web service, and the fact that of all languages outside of our primary product codebase, PHP is the most well-known among our developers.

One of the primary criticism leveled at Go by my colleagues is the syntax/ease-of-use, which I believe may be due to comparing apples and oranges in various codebases. Having access to two demo APIs created by myself (for the Go version) and a coworker (for the PHP version), I thought a real side-by-side might be instructive.

Keep in mind that neither of these are meant to be production ready, and would not even necessarily be considered idiomatic. Whenever possible, I tried to keep the solutions as similar as possible. The full side-by-side is located here.