Hacker News new | ask | show | jobs
by bomewish 1033 days ago
why php?
2 comments

It’s the only language I could think of that could express a whole working example in only a couple of lines of code in a highly readable way.

Other languages I know would require imports/boilerplate that would distract (Go/C#/C/Python/Scala/JS) from the example. Bash might be more familiar with devops but less familiar to regular programmers — part of the illustration I wanted to make was that it didn’t need to be a devops thing. Also PHP (along with JS) is a language most devs know a little bit about, whether they want to or not.

Worked out beautifully imo. That PHP script is super concise and readable, so it's a great little illustration.
Can curl do the url encoding? Isn't there some new "variables" thing in the newest release?

Can valid Unix usernames have special characters that need escaping? I should know that by now.