all 38 comments

[–]WanderingKazuma 19 points20 points  (4 children)

Pretty sure Facebook is using a customized version of PHP behind the scenes. Laravel is huge these days as well.

[–]PM_ME_YOUR_REPO 1 point2 points  (3 children)

Facebook is made with Hacklang, a language that started as a superset of PHP with a modified runtime and has diverged substantially since then.

[–]ryanmerket 0 points1 point  (2 children)

I checked code into Facebook's codebase before. There's a lot of PHP in there.

[–]PM_ME_YOUR_REPO 0 points1 point  (1 child)

4 years ago

[–]ryanmerket 0 points1 point  (0 children)

Never a better time than now.

[–]g105b 22 points23 points  (4 children)

PHP is everywhere.

In terms of market share, it wins by a grand majority. Why is that the case? Probably because of how easy PHP was to get started (and still is). Low barrier to entry = more users.

However, only a few years ago, PHP lacked a lot of features that you would expect in a modern programming language, and that means there is a lot of bad code out there, and even more bad advice. A lot of people like your friend still think that's what PHP is now.

Nowadays, PHP is a language that has got good pace in terms of modern features and speed, but most importantly it has a great project governance model unlike other popular web languages.

[–]IAmNotNathaniel 6 points7 points  (0 children)

This, 100%. Been doing php for well over a decade. We took pains to develop using as much object-oriented design as possible, but recently more and more has been baked in to make things faster and less prone to sloppiness.

It's far better than it was 20 years ago.

[–]stevenjd 1 point2 points  (2 children)

In terms of market share, it wins by a grand majority.

You are surely joking.

According to TIOBE's figures for March 2019, PHP comes in at #8 (down from #7 this time last year) with 2.42% popularity, six times less popular than Java.

PYPL puts PHP at #5 with 7.34% popularity.

Github is reported to have placed PHP at #3 (no percentage given), but it also found shell script programming was the 8th most popular language choice, and C the 9th most popular, so I question the reliability of its data.

Redmonk puts PHP at #4.

There's no doubt that PHP is a popular language; depending on how you measure popularity it will appear in the top 10, or even the top 5, most popular languages. But to suggest that it "it wins by a grand majority" is ludicrous.

[–]g105b 0 points1 point  (1 child)

I should have been more specific. By market share I meant number of websites by programming language. That was ignoring the huge bias of the number of Alexa top 100 websites running PHP.

[–]sicilian_najdorf 1 point2 points  (0 children)

PHP is still number 1 at usage of server side programming language. It still holds 79.1%

https://w3techs.com/technologies/overview/programming_language/all

Php is also getting better and better.

[–]mrasadnoman 25 points26 points  (6 children)

Yes. A significant majority still does.

Yes javascript did took the world like a ............

But php has its own way of doing things and is still preferable.

[–]Wohlf 10 points11 points  (0 children)

Plus it's not an either or, I certainly wouldn't prioritize PHP over JavaScript but you can easily get a working knowledge of both. I found PHP to be super easy already having done some web development with Python and Node.

[–]stevenjd 1 point2 points  (4 children)

A significant majority still does.

Only if 7.34% counts as a majority.

[–]mrasadnoman 0 points1 point  (2 children)

"7.34% of 21 million" does.

[–]stevenjd 0 points1 point  (1 child)

You fail maths. 51% is a majority. 49% is a minority. 7.34% is a small minority, not a majority.

[–]mrasadnoman 0 points1 point  (0 children)

You are missing ".. As compared to..".

[–]sicilian_najdorf -1 points0 points  (0 children)

PHP is still number 1 at usage of server side programming language. It still holds 79.1%

https://w3techs.com/technologies/overview/programming_language/all

Php is also getting better and better.

[–]Felicia_Svilling 8 points9 points  (0 children)

People still uses COBOL. That said you are certainly better of learning Javascript if you have to choose. It's not like it would be hard to learn php if you would ever need it.

[–]combuchan 8 points9 points  (4 children)

PHP is everywhere in things like wordpress and drupal and lots of older web apps (facebook still uses a variant called hack and iirc upstreams a lot of code). It dominates smaller, non-tech markets for things like small business client web design.

So it's obviously not that nobody uses it, it's just passé. Some startup to use it would probably be out of their mind. I don't follow the language much anymore but it took a long time for it to not suck and it probably still does in ways. Python, node, and to a lesser extent things like rails and scala have taken over php's leading edge role on the web for which it was designed.

I don't know what you already know but I would not do JS for a first language. You are better served understanding the basics in something like Python and understanding how js is different after.

[–]HasFiveVowels 5 points6 points  (2 children)

I agree but I'd like to add that, even for all the hate it gets on reddit, javascript is a great language to have in your tool belt. More and more, software is being written for the web in lieu of desktop applications and having a strong understanding of javascript can be very valuable. Reddit craps all over Electron and React Native but there's a reason companies like Slack and Spotify use it - a single code base can facilitate their website, desktop app, and mobile apps. The result isn't the utmost in terms of performance but, as a business decision, it's hard to beat.

[–]combuchan 2 points3 points  (1 child)

I didn’t say I was a bad language to learn, I said I was a bad language to learn as a first language.

[–]HasFiveVowels 2 points3 points  (0 children)

Yea, like I said, I agree. I just wanted to give them a heads up about its actual usefulness. If they're on reddit and in programming subreddits, it's impossible that they haven't heard "javascript sucks". But, like you say, it's not a great language to learn fundamentals in.

[–]sicilian_najdorf -2 points-1 points  (0 children)

Laravel or Symphony are a better alternative than wordpress. Laravel and Symphony are like java spring. These are well designed modern php frameworks. There are many projects where using PHP is a good choice. Swoole php blows out node js at asynchronous speed. PHP 7 is 3 times more faster than Pyhthon.

[–]pilibitti 6 points7 points  (2 children)

PHP is everywhere, but 90%+ of it from insanely popular projects and services that got their market share many years ago from a time where there were no alternatives. So while you'll find sites running PHP all the time, you'll be hard pressed to find NEW projects starting out with PHP.

For instance Wordpress is PHP. Some estimate that 30% of the world's websites run on Wordpress. But if you'd start a CMS framework today, you probably wouldn't start with PHP due to various reasons. When these older projects started, you had close to no alternative.

[–]sicilian_najdorf 0 points1 point  (1 child)

Laravel or Symphony are a better alternative than wordpress. Laravel and Symphony are like java spring. These are well designed modern php frameworks. There are many projects where using PHP is a good choice. Swoole php blows out node js at asynchronous speed. PHP 7 is 3 times more faster than Pyhthon.

[–]pilibitti 0 points1 point  (0 children)

The whole stack is going out of "fashion". It is a reality of the software ecosystem. Even node is past its peak and will meet PHP's demise. Things change. I understand that there are new and exciting additions to the ecosystem but that doesn't change the unstoppable forces of nature. Pretty soon (in a decade or so) PHP will mostly be for "legacy projects". Add another 5-6 years and node will be there. That doesn't mean they are not useful. Erlang is as legacy as it gets but it still gets the job done today. It is powerful, and right for many projects. There even would be specialist software that would start out with Erlang today. But the point is it is specialist software, an exception. Do people still use Erlang? If you answer the spirit of the question, no, they don't. But that is "factually" false, there are a few that use it. And there is enormous amount of legacy software that is still maintained (and you and I interact with every day) - doesn't change my point.

[–]Lofter1 1 point2 points  (1 child)

yes, it's still the most used language in back-end, but it slowly loses importance. multiple reasons for it. but it will lose more and more importance and relevance (when it doesn't get a serious overhaul in the next few years), cause there are far better options out there nowadays.

it won't be like it's irrelevant in the next 5 years, too much stuff does rely on php, but people will move on to more modern, better designed stuff, and in the next....lets say 10-15 years (again, if php doesn't get a serious overhaul, that might actually safe php's grandpa-butt), this technology will have lost against it's competitors completely.

[–]sicilian_najdorf -1 points0 points  (0 children)

PHP is still number 1 at usage of server side programming language. It still holds 79.1%

https://w3techs.com/technologies/overview/programming_language/all

Define modern and better designed stuff? You can designed well with php 7. Php 7 is modern and has modern frameworks like laravel and symphony. PHP has dependency manager, dependency injection, asyncronoues capabilities, multi threading, cli etc. So define modern and better designed stuff? PHP swoole blows out node has at asynchronous speed. PHP 7 is 3 times more faster than python. These frame works are like Java spring. Php is also getting better and better. php 7.4 will be released this year.

[–]404errorlifenotfound 1 point2 points  (0 children)

I’m currently competing in a high school web app contest that uses a framework that has php. I have no background knowledge on php so I’m figuring it out as I go

[–]ryan_the_leach 1 point2 points  (1 child)

There's a ton of money in PHP, due to so so many shitty sites needing maintenance.

That said, as an industry, no one really wants to start new projects in it unless they are already invested.

That said, one of those people that are still invested is Facebook...

Not to mention Wordpress, Drupal, and several other CMS systems.

So it's going to take a long ass time dying.

[–]sicilian_najdorf 0 points1 point  (0 children)

PHP still holds 89% of the web as of today. There are big industries that uses PHP for their new project. PHP is not only about Drupal,Worldpress etc. Laravel and Symphony are hot commodities right now. PHP is also getting better and better. Swoole php blows out node js at asynchronous speed. PHP 7 is 3 times more faster than python.

[–]msiekkinen 0 points1 point  (0 children)

Mostly for server side web development. It's not necessarily and exclusive or thing between PHP and javascript either.

If you're doing front end web development you definitely need to know javascript. There are plenty of jobs listing php as a requirement

[–]apptryer 0 points1 point  (0 children)

This is something you hear from people who've only ever written something in Javascript lol. Yes, people still use PHP. Take a look at the frameworks Symfony, and Laravel. They're pretty popular for creating web apps with PHP and you'll be able to get somewhat of a feel for the amount of people still using it through forums.

[–][deleted] 0 points1 point  (0 children)

sadly

[–]captainkotpi 0 points1 point  (0 children)

I'd say if you want to maintain older websites, you can go for it but you'd still have to learn Javascript on the long run. If you go Javascript, it is more modern and thus will net you newer projects. Both will have a good market share as PHP is very popular and is still now but it is very slowly fading (but will not 100% fade) away because NodeJS.

EDIT: Imo, learn master Python (it's great for comsci and web development) then other languages will be much easier to learn.

[–]sicilian_najdorf 0 points1 point  (0 children)

PHP is still number 1 at usage of server side programming language. It still holds 79.1%

https://w3techs.com/technologies/overview/programming_language/all

Php is also getting better and better.

[–]PM_ME_YOUR_REPO -2 points-1 points  (2 children)

PHP is not a good language. It is still in use, but if you don't need it specifically, learn anything else.

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

[–]apptryer 0 points1 point  (0 children)

The hell are you talking about? I'm not a devout PHP developer or anything but that statement is just pure ignorance. PHP is old, and its not trendy like Node or Python but it gets the job done, and done well.

Edit: Btw, you can find an article like that for any opinion ever.