3 ms·
>> 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'
by 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.