Hacker News new | ask | show | jobs
by coding_lobster 2053 days ago
I have no metrics on this but I was under the impression that due to the size of the PHP community the package ecosystem specifically for web is probably larger. The community itself being larger is of course another plus as it means you're able to get easier access to the knowledge of others.

Thirdly of course the shared hosting providers (by what I've seen in the past) usually support PHP almost always - this is not the case for either Ruby or Python.

4 comments

'larger' in terms of what? I don't know what you'd have to do 'specifically for web' that you'd find yourself writing python and thinking 'damn shame there's no package for this'; and JavaScript's must be way (overly) 'larger' (package count) than that.
Yup, for web stuff you’re right. Python has a larger overall user base, but much of that usage is in non-web contexts, whereas PHP is pretty single-mindedly focussed on websites.
I didn't even realize shared hosting providers still existed. I thought everything was virtualized and containerized. But indeed, sites like Gandi.net sell shared hosting.
Performance is also better than Ruby and Python. While providing comparable development experience / ease of use.
> While providing comparable development experience / ease of use.

I would argue with that.

Part of my job is writing a lot of PHP currently (Hack actually, but they are very similar). Sometimes it's OK, but sometimes early PHP design decision to make code always appear working correctly and avoid raising user-visible errors really make me wish I was coding in another language. One of latest examples: when converting string to floating point number, sometimes you get 0.0 in case of parsing error, sometimes part of string is ignored.

Yes, PHP has some warts, but so do ruby & javascript [1], python [2], and all other similar languages. The keyword to look for people explaining some of these warts is "wat" (popularized by the talk at [1] I think).

[1] https://www.destroyallsoftware.com/talks/wat

[2] https://github.com/cosmologicon/pywat