Hacker News new | ask | show | jobs
by jimnotgym 2762 days ago
A majority of the web runs on one of a handful of programs that use php...WordPress, Magento...
1 comments

While true, there is still a tremendous amount of the web that is powered by php and not using WordPress or Magento.

Facebook, Yahoo, Wikipedia, even Google.

Facebook forked PHP to make Hack to try and make PHP usable.

Yahoo is yahoo.

Wikipedia wouldn't have the resources to change anything.

Google has a wiki page for their developers telling them to never ever use PHP for any google project.

> Facebook forked PHP to make Hack to try and make PHP usable.

Facebook clearly found PHP usable before they created Hack, otherwise they would (a) not have bothered and (b) may well not have existed in the first place.

The accurate statement is probably closer to "FB created hack to adapt to performance demands at an unusual scale and add some additional typing discipline bringing additional order across a large engineering team."

I'd take it one step further:

At Facebook scale, performance gains have huge returns (adding typing can improve pefromance), so they try to improve all parts of their infrastructure, not just PHP.

For example, Facebook's bolt for native code: https://code.fb.com/data-infrastructure/accelerate-large-sca...

PHP probably did have more low hanging fruit than say C, I'll give them that.

Just because Google doesn't have a use for PHP doesn't mean it has no use or that it's dated or having "a hard time keeping up." Why would Google want to use PHP when it doesn't have a core competency that uses it?

On the other hand Microsoft does use PHP in some cases, where it makes sense, like company blogs. What's wrong with that? Nothing. The right tool for the right job. People that hate on PHP are usually people that over engineer things. Why build something like Wordpress in .NET or Node.js...when you don't need that, because you already have Wordpress and it works fine for a small site or blog? People will spent 10x the amount of time trying to -not- use PHP on a simple project than to use that time doing something else.

It's like this new "let's containerize everything" movement. Ok, you just spent an hour setting up something that would normally take 5 minutes, and you now have access to a bunch of features your little app will never ever use. Congrats.

No one is saying use PHP to build a super complex webapp, (though you could do that if you wanted!) But for small project PHP is very hard to beat when it comes to time/benefit. Right tool, right job. Simple. Biggest complaint I have against modern developers is the tendency to make a simple thing complex because it's en vogue to use X, vs Y. Gotta build this small web app with 50 users and no need to scale, better build in Node and Kubernetes. So laughable.

There's also Laravel, which is more popular than both Django and Rails on a worldwide basis (https://g.co/trends/9CGj5). Rails and Django are more popular in the US where I hear PHP is not very popular...
Interesting, I have seen a surge of Laravel + Vue.js in recent projects. And many companies wanted to move back to PHP / Laravel from Ruby Rails / Django.
> Google has a wiki page for their developers telling them to never ever use PHP for any google project.

I didn't know that, but it makes sense - the things that PHP's good for (getting a web-based service backed by some sort of datastore up and ready to receive requests) are not the things that Google (on the whole) cares about.

Google instead cares that the thing can be improved and maintained by your colleagues, few of whom know PHP.

Those facebook improvements made there way back into the core.

Google might be able to move quicker if they allowed php. Facebook killed them in social. The type of products google can offer is limited by this decision.

Not sure PHP is the reason reason why Google failed at competing at Social
It is not.
Google+ did not fail for technical reasons. Everything I saw about it was technically better. It failed for social reasons, facebook already exists and has everyone on it.
It didn't failed for Social Reason, it failed because it was an inferior product for the mass. Facebook succeeded because its concept is simple enough for even your GrandMa and Dad to understand.

Google+ was designed by geeks for geeks.

Facebook was here already when Instagram, Twitter, Instagram, Snapchat became popular
All of those did something different to facebook. None of them attempt to replace it. Googles problem is not that they can't move fast, they already move too fast. Every year they totally rebuild an IM platform and create a new music streaming service.
HHVM can't make its way entirely back to core, and is in fact completely separating from PHP entirely now[1]. If I recall correctly, while PHP7 implemented better op-caching, it has _not_ implemented JIT compilation yet.

1. https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html

This is true. But HHVM lit a fire under the php devs to get php7 out the door with significant performance improvements. (php6 never saw the light of day). Php has improved so much with the 7x releases.
Php7 is pretty damn fast with apc cache and some tuning. Not to mention it doesn't have any of the silly restrictions that hhvm had.
It hasn't - a JIT compiler (if it comes) will come in PHP 8.
Employee of Google here... really? Where does Google use PHP?