37 AnswersNew Answer
PHP is essential with developers who specialize in open source projects built in PHP. It seems that custom PHP applications are still being built by freelancers and small consulting firms where PHP is their strongest language. However, it has been my experience from over the past 20+ years, PHP is not the language of choice among enterprise developers or polyglots like myself who are familiar with many languages, including PHP. Many who specialize in PHP as their core language will argue the merits of the language and the various frameworks. I'm not disputing that you can build applications with PHP. I'm simply sharing my anecdotal observations which include the following: 1. I've personally been involved in over a dozen major rewrites from PHP to C#, NodeJS, or Ruby. 2. I know from first hand conversations with core devs of a few well known PHP open source projects how they wish they could rewrite in another language. 3. One did get rewritten. 4. New competing projects are not using PHP.
Tarun Pandey If you're going to copy blah blah blah from some blah blah blah website as your first paragraph, at least have the decency to include a link to one of the many sites that copied this same text. 🤦♂️ https://dzone.com/articles/is-php-dead Trying to then add your own poorly paraphrased response of the same clichéd blah blah blah without any points of substance is really quite disingenuous and results in adding more noise that lowers the quality of the content in this community. 🤦♂️ Sheesh... I think I really need to take a break from SoloLearn as there's an overwhelming number of people who are more concerned about posting their blah blah blah nonsense than trying to actually learn from others. At least have the courtesy to read what's been posted already and then contribute only if you have something new to add. Otherwise, your answer just buries any decent discussions that might already be ongoing. 🤦♂️
Ore Having personally built many complex plugins and multisite extensions for WordPress, SugarCRM, Magento, Moodle, Joomla, Drupal, built apps in Symphony, CakePHP, and Laravel, my technical criticisms of PHP are from a deep level of experience with the language. The massive popularity of WordPress has little to do with the strength of PHP and more to do with preferences of bloggers and proliferation of PHP on linux hosted servers. Truth be told, much of the hate for PHP for most experienced software developer's comes from the horrific mess of PHP code in the WordPress ecosystem. I actually used to be very involved with the WordPress community and a speaker at WordCamps and have spent much time with several core developers and the founder Matt M over dinners and after party drinks many o'times between 2008 and 2012. While I won't go into specifics, I assure you, the commitment to PHP was not based on any love for the language. Staying on PHP was a source of much internal debate...
I'm not disputing that PHP is the most widely installed server side language... but that has more to do with packaged software than with new development. You might be in a market where PHP is strong. But, I can tell you with high confidence, in the USA markets... you might be shocked by how looked down upon PHP is these days by most dev shops I'm in contact with. Seriously... the only people I know who prefer PHP are those who aren't also familiar with at least 3 or 4 alternative server side platforms. I guess they don't know what they're missing. That said, I could build a super impressive PHP website today that might rival any other language. But, I would be complaining quite a bit along the way feeling like I took many steps backwards in the entire development experience compared to the other alternatives I would rather be working with. But... what do I know? It's all just my opinion. 😉
David Carroll, right on! 👏👍 The second paragraph does not appear to be so much an own paraphrased response as it can be found at least here: https://yourstory.com/mystory/15d4d9365c-scope-of-php
Just want to throw in that it is very interesting to follow this sparring of the titans here. Thanks for sharing your knowledge and experience.
Once someone told me that PHP is getting old.....that person told me that nowadays js libraries are more efficient than the older PHP. Though yes, if you have more knowledge about the frameworks of PHP, it's an added advantage.
David Carroll I have heard most of these criticisms a countless number of times from expert developers like yourself who have been writing PHP for a long time. I am aware of the dislike many developers have towards PHP. But in my opinion this dislike is caused by the experience of writing and reading bad code in the language prior to PHP 7, PHP-FIG, gradual typing and AST. In my experience, these new developments have revolutionalized the way I write PHP code. Also, there are wonderful frameworks like Laravel, Slim, Drupal and countless number of free components by the community. I understand your criticism of WordPress. But WordPress — a content management software — should not be confused with PHP — a programming language. TL;DR PHP has grown and is now a pleasure to work with. Businesses love it and we developers should too. Now, in 2020, there are many good alternatives to WordPress: OctoberCMS and Drupal 8 are my best.
David Carroll Ore Coder Kitten ++༒«ᵛ ⁱ ⁿ ᵃ ʸ ᵃ ᵏ»༒++ Tarun Pandey JS Fan Maxwell Anderson aside from the well represented opinions, back to vidya original question... "What is the scope of PHP today in the market?" PHP has the market hands down in the Enterprise Market. Discounting Wordpress, because as a non-programmer supporting Global Enterprises Web Presence I have no experience in that market, but aside from a few Windows Shops, the thousands of customers my company supports primarily run PHP to talk to the backend. It is definitely 80% or probably higher. IMHO, like it or not, if you are looking to work as a web developer in a corporate environment, PHP is definitely going to be a need for your tool belt?! 😎👍
It is the most popular in today's market. Let nothing dissuade you from learning it. It is a great language with a large community and a lot of useful open source projects. Laravel, the most popular open source back end framework is built with PHP. https://expertain.net/7-backend-frameworks-with-the-most-stars-on-github/amp/ WordPress, the most popular CMS is also built with PHP. https://websitesetup.org/popular-cms/ Wikipedia, Flickr, Canva, Yahoo are built with PHP. Facebook uses Hack, a modified version of PHP that runs on HHVM and best suits their giant codebase. PHP is used by about 80% of websites. https://w3techs.com Remember, there are two types of languages: 1. The ones nobody uses 2. The ones everybody complains about
Now, PHP developers can write bug free codes with unit testing, type hinting, XDebug etc. Most importantly, to get the best of the language we must be ready to accept its weaknesses and find strengths in them. There is no perfect language. Not that I know of.
Sorry Ore, but not a chance. I simply don't believe PHP's general popularity in fields other than the server will increase. It doesn't matter what new features they promise because none of those features put PHP above any other language that's already used for ML and AI. If PHP were to very quickly provide multiple, significant reasons to be used instead of something like Python, it STILL wouldn't be enough to boost itself in these fields.
David Carroll should I learn php or angular+nest js for backend
I am not aiming for money but my main concern is to produce some of the world's best website
David Carroll Yeah I did take a break from SL 😂 But anyway, I agree with you on your points about PHP; it is truly an awful language to write in.
For those interested in PHP 8 https://stitcher.io/blog/php-8-in-8-code-blocks https://stitcher.io/blog/new-in-php-8
Maxwell Anderson 😒 okay. I was just sharing my thoughts though.
David Carroll I am flattered. LOL.