2 ms·
"1. PHP is stupid easy to scale...shared nothing" How is that a language-level feature? Unless the comparison is to framework level features like ASP.NET Sessi
by MichaelGG 14y ago
"1. PHP is stupid easy to scale...shared nothing"
How is that a language-level feature? Unless the comparison is to framework level features like ASP.NET Session State, but PHP would only work around that by using memcached or something, right? Or is this referring to the fact that I can't have shared variables at all, so I can't cache super common data structures in a local piece of RAM?
"2. I won’t need experts" - It must be nice, if boring, to be working on really simple codebases where anyone that can hack PHP can work on your application.
"10. Dynamic typing" - There are plenty of neat reasons for dynamic typing, like easy metaprogramming and whatnot. Having crazy type coercion isn't one of them. And "HTTP is untyped so should PHP"; I'm not sure what to make of this.
This goes along with "11. It plain works" -- yea, depends on how you define works. "A lot of that is based on “assumptions” (or shortcuts) that PHP takes to solve a problem. Most often those shortcuts work, and the workarounds are very easy to implement (I’m thinking mainly about strict type checking here)."
And that's the real issue that I can see with PHP. Sometimes, some stuff might sorta make sense, and the rest of the time you're in this weird "gotcha" land, with the inconsistent API and language design.
The only compelling reason I've seen for using PHP is "well, pretty much every server has it installed, and it's super easy to get working with a webserver". PHP seems to surpass everything else in that particular area. Apart from that, come on...
- mikescar 14y ago>> Or is this referring to the fact that I can't have shared variables at all, so I can't cache super common data structures in a local piece of RAM? This isn't true. You can store variables in APC and they are available in local RAM across all PHP processes (within CGI + webserver at least, the same APC cache is not available to cronjobs and other scripts). >> "2. I won’t need experts" - It must be nice, if boring, to be working on really simple codebases where anyone that can hack PHP can work on your application. This can be read as a negative, but I see it as a positive in a lot of cases, i.e. when you already have a plan for your app, and you can get by with a reasonably good developer who can follow directions and write good code. I think what the OP meant was that you're not constrained to rock-star/ninja keywords, but if you find that person, then all the better. >> This goes along with "11. It plain works" -- yea, depends on how you define works. "A lot of that is based on “assumptions” (or shortcuts) that PHP takes to solve a problem. Most often those shortcuts work, and the workarounds are very easy to implement (I’m thinking mainly about strict type checking here)." >> And that's the real issue that I can see with PHP. Sometimes, some stuff might sorta make sense, and the rest of the time you're in this weird "gotcha" land, with the inconsistent API and language design. Correct, PHP is not a strictly typed language and the userland function and class names are not very consistent. There's a lot of other languages that are more elegant and fun to work with. It does have very real benefits in terms of flexibility, ease of deployment, expected behavior under heavy load, and finding developers who can learn quickly whatever is unique about your stack. Every language and stack has it's own "gotcha" land; this issue is not unique to PHP. Honestly responding to this in threads is kind of a waste since we'll all be in this conversation again the next time another PHP good-or-bad thread pops up on HN.