4 ms·
why php?
by bomewish 3y ago
why php?
- withinboredom 3y agoIt’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.
- pxc 3y agoWorked out beautifully imo. That PHP script is super concise and readable, so it's a great little illustration.
- n8henrie 3y agoCan 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.