Hacker News new | ask | show | jobs
by tjlytle 5080 days ago
There are pros/cons to any language. If you're developing something web related, PHP is certainly worth considering (especially in your case, as you have experience with it).

Just a few quick thoughts:

PHP is - in most cases - very tightly coupled to the HTTP request. This can be good or bad depending on what you're building. Doing a lot of offline processing? Probably bad. Serving up web pages? Probably good.

There's no (or little) state with PHP (you do have the session, which can be pushed to memcache), so - generally speaking - running your application across a bunch of web nodes isn't too hard to implement (even scaling the horrible legacy style code that helps give PHP a bad reputation shouldn't be too hard). This may or may not be important to you.

There's really no one true way with PHP - it can be used for a simple 10 line script, or for a large scale web application. If you like (or need) that kind of flexibility, it could be a good choice.

Bottom line is - it's certainly sill worth considering, just know why you picked it (or whatever other language/platform you use).

That said "it's what I know" or "I wanted to try something new" aren't necessarily bad reasons.

1 comments

Good points. I feel I should point out that you can use PHP independent of any web server by using the command line interpreter (CLI) version. This is, for example, how we run PHP cron jobs where I work.
True. Not a strength for the language though - if that's a big part of what you do, then I'd consider something else. That said, I've built plenty of applications that used PHP on the command line or as a daemon.