Live data from Hacker News

An Internet of PHP

timotijhof.net

211–220 of 333 posts

Re: An Internet of PHP

#211

"PHP is dead" is dead. The amount of people praising PHP these days is quite high and increasing. Of course I may also be in a bubble (of php devs), but I have seen a constant increase from JS-people starting to look (and in some cases, convert to) php. Also, many new youtube videos highlighting the new stuff in the language, how modern it is, etc. Honestly, anyone that blindly criticizes or dismisses php these days,…

Well the problem is that "the internet" (google, stackoverflow) does not (by default) filter out any old/obsolete information. People googling for solutions will get 30+ year old "advise" on how to do certain things / use certain libraries etc. Especially StackOverflow should be incorporating a major version number for which the question is valid. So yes, "PHP is still dead" as long as you get the same old advise.

StackOverflow has been trying to address that problem. I've recently seen them show a newer answer on top of the "accepted" answer even though it had fewer votes. This helps the answer evolve over time.

https://meta.stackoverflow.com/questions/405302/introducing-...

Re: An Internet of PHP

#212

From W3Tech; > PHP is used by 77% of all the websites whose server-side programming language we know. I had a quick look at the methodology section, but it’s not clear to me how accurate this data is. Determining whether a site uses PHP can be relatively straightforward (especially with default extensions / if Wordpress is used / etc), but if a site (potentially using a different language) is behind a reverse proxy/u…

People have already questioned the validity of this number. Do a search and you'll find people looking into this and conclude that the number is very unreliable. Whether you agree or not is up to you.

Also I want to point out that almost any time people quote number about PHP's popularity, this is the only number, which is strange -- for metrics like iOS market share you can always find multiple numbers from multiple sources which don't fully agree with each other but are within a certain range. Not for this PHP number. In other words, w3tech's number is not cross validated by any other source. I wouldn't use it to "prove" anything.

Re: An Internet of PHP

#213

Unfortunately, the current maintainers of PHP have not learned from the success of it. And are driving PHP into the direction of having the rigid structure that Java has. It is so successful because people who build new things are different from people who are paid to maintain old things. That is why WordPress, Wikipedia and countless other successful internet projects have been created using PHP and not using Java.…

This move toward a more rigid and static typing pushed me to move to Java (which also pays more). After 15 years of PHP and over 5 in Java, I wouldn't go back now.

For a one-off script, I might still use a bit of PHP, if I didn't have javascript.

Re: An Internet of PHP

#214

Earlier quoted context omitted.

Your comment makes no sense. How is that framework or PHP specific? Its simply a misconfiguration the server.

Some frameworks in the old days of PHP relied on .htaccess files to restrict access to unwanted files. Properly implemented frameworks would load everything from a directory above the documentroot to avoid these issues.

.htaccess is a config file type used by the Apache web server.

The server software reads the config file and then decides if the folder can be accessed externally or not.

It has nothing to do with PHP what framework or any other language you are running.

Re: An Internet of PHP

#215

Earlier quoted context omitted.

Not to nitpick but choosing a programming language isn't a minor decision nor is switching programming style, e.g. OOB vs FP. Of course I agree with the intend and I too want to work in pragmatic and explorative programming environments trying out different programming languages and styles depending on the project.

> Not to nitpick but choosing a programming language isn't a minor decision In the grand scheme of things, talking solely about software projects not life in general, it kind of is. Most modern languages, are interchangeable, and projects of most kinds have been done with all of them succesfully. As long as the programmers for the chosen language are available, and the libs you want are there, for startups doing some…

I don't think "interchangeable" is the right word here. In some cases, perhaps, but different languages have different idioms and, since you have Clojure on there, different paradigms. If the individual coming into the new language is diligent about learning how to properly work in it, then all is well. If they decide to try and force what they already know into the new language, that is problem. I've experienced the latter far more often than the former. If you're working for a feature factory, though, I guess it doesn't matter.

Re: An Internet of PHP

#217
post #99

Earlier quoted context omitted.

And they are humble. They know their state, the flaws in their language and the long problematic history they have. They cherish their languages but are not fanatics.

PHP has its fair share of snobbery as well. Non-framework devs look down on Symfony, who in turn look down on Laravel devs, and everybody looks down on WordPress devs.

Every language does, I think it comes with the territory of any domain where fine details matter. The trick is to cultivate your own opinions and approach to excellence, but recognize there are a lot of different things to optimize for, and no one likes a comic-book guy attitude.

Re: An Internet of PHP

#218

Earlier quoted context omitted.

> "like... a HTML file?" Serving a static HTML file is not server-side rendering. It's much dumber than that. The people advocating for SSR want the server to respond with HTML generated based on whatever is in the request.

So like PHP? This thread is so cope.

[deleted]

Re: An Internet of PHP

#219
I'm in my 30s and grew up with PHP since the 2000s.

There's still an insane amount of money to be made with WordPress plugins, WordPress support, and more. That industry isn't dead, it's thriving, it's insanely cheap to jump into and not get yourself into debt, and there's tons of people that need help.

While people here argue about the 10th "correct" way to do server-side rendering (hey, React says we gotta use RSC now!) or figure out how to get their Rust code to compile to WASM for their Codepen demo website to increase a number from 1 to 2, thousands of us churn away daily making money from this "dinosaur" PHP in the real world.

The bias on HN makes you think PHP is completely dead and it's funny to see the comments here.

Re: An Internet of PHP

#220
post #133

Earlier quoted context omitted.

PHP is also pretty easy to support for shared hosting, as what they essentially need is just an Apache module (+ nginx probably), some clever filesystem permissions and they're done. For node, Python, etc, you actually need to keep the application servers running, which has to stay running even when they're completely idle. So I think PHP is a natural choice for shared hosting for those reasons too.

> For node, Python, etc, you actually need to keep the application servers running Not with CGI.

You're technically right, however I imagine performance would be really poor, especially for Node. PHP has transparent opcache support and it's generally fairly efficient when run as Apache module, so it's usually preferred. You can of run PHP as CGI as well, however it's much slower.
Post reply on HN