4 ms·
Your impression is completely different from the reality. Facebook was/is irrelevant to PHP adoption. Their only effect was to increase the speed of PHP. PHP
by ars 8y ago
Your impression is completely different from the reality.
Facebook was/is irrelevant to PHP adoption. Their only effect was to increase the speed of PHP.
PHP is widely used because it's really great language for web development. It's better than the other choices because of ease and rapidity of development, and because it was designed for the web, not as a regular language with web things bolted on (Python and JAVA are examples of that).
It is not fading at all. Some developers think it's too easy of a language, so they discount it as for beginners only. That's about it. It's a kind of snobbery, which I'm glad to see seems to be vanishing with the release of PHP7.
- k__ 8y agoIf what you say is true, how come it is not supported by cloud providers?
- detaro 8y agoIn what way is it "not supported by cloud providers"? Google App Engine: has PHP runtimes Heroku: supports PHP Azure App Service: supports PHP. Experimental support in Azure Functions available. AWS: I think the only language-specific thing they have is Lambda, which doesn't directly support PHP, but it can be run on it with workarounds if you really want to. Everything exposing VMs or containers of course can run it. API client libraries/SDKs are widely available. FaaS support is limited.
- SwellJoe 8y ago"Some developers think it's too easy of a language" Good lord, who thinks that? PHP is a terrifyingly complex and difficult language. I'm not saying it's bad, it's been very successful for its intended purpose. But, it is definitely not an easy language. It's got thousands of standard functions in the global name space (admittedly, it has been recognized that this was a mistake, but it's all still in there), quite a lot of syntax, and some weird syntax that's unlike any other language, a high level of verbosity in many places (due, in part, to that whole thousands of functions in the global namespace thing, but also due to an apparent admiration for Java during a critical period in PHP development), a variety of quirks and inconsistencies, etc. PHP is a very big, very complex, language, that takes years to master. I can't see how it can be called "easy". Many other languages are much better teaching/learning languages. PHP is popular and widely discussed, which helps with learning it. PHP is also very easy to deploy, because it is the "standard" web language...you just upload your files to the right directory on most hosting platforms and you're done. That's great, but doesn't really make the language easy.
- ars 8y ago> It's got thousands of standard functions in the global name space There is exactly 0 difference between prefixing a function, and putting it in a different namespace. All those functions have prefixes and are very easy to locate and understand. It's literally the difference between \foo\bar and foo_bar. It makes no difference for understanding the function. The only advantage of a formal namespace is you can "own" it, and other code can't put things in there. Not having it does not making the core language harder to understand. > quite a lot of syntax It's basically the syntax of C. The most complicated parts are lambda functions and references. And that's nothing. Where are you getting "quite a lot of syntax" from? Classes have a bit of syntax, but it's hardly "quite a lot", and the nice this is you don't have to learn any of it to get started. > a high level of verbosity in many places Where? PHP is not especially verbose. Examples? > a variety of quirks and inconsistencies, etc. There's basically just two: Comparing an empty string and the mistake with precedence on the ternary operator. Everything else confusing is the difference between arrays and Key/Value structures, and it's not really not that hard to figure out. > PHP is a very big, very complex, language, that takes years to master. It is not very big. The core language can be learned in a week. It's not very complex either - it's among the easiest languages out there. > Many other languages are much better teaching/learning languages. Not because they are easier - because they are harder!! They are more structured and you have to understand more - that makes them good to teach concepts. PHP was never intended as a teaching language.
- SwellJoe 8y ago"Not because they are easier - because they are harder!!" That doesn't make sense. I think we'll just have to agree to disagree. I believe there are many languages, including some often used for web development, that are easier (and better teaching/learning languages) than PHP in several regards. Python is the most obvious but Ruby also fits the bill.