Live data from Hacker News

An Internet of PHP

timotijhof.net

321–330 of 333 posts

Re: An Internet of PHP

#321

I've always liked PHP. You wouldn't pick it for your job interview's coding test if you had a choice (Python all the way there), but it's so intertwined with the internet and what we've learned about programming over the years. First mover advantage kind of deal. And I've never had to deal with ESM/CJS/AMD whatever module nonsense with PHP. No transpiling anything, just edit and refresh. And so many useful functions…

PHP is akin to, I don't know, the Subway (fast food restaurant chain) of programming languages? You don't hear too much about it. You almost never notice it unless you're actually looking for it, unlike McDonald's with its ostentatious golden arches. It's popularity is waning. But it's still everywhere. [0] There are a hundred other sandwich chains that have tried to do it better but none have managed the ubiquity of…

> I guess that means that JavaScript is McDonald's?

My first reaction to this was that it's actually very accurate insofar that I genuinely wonder how one can like either of these and why they're so popular. At least JavaScript has the obvious excuse that it's the only thing that runs in a browser, so it's still more logical than the popularity of McDonald's.

Re: An Internet of PHP

#322
post #134

I’m quoted a bunch in this, which I appreciate, but there’s one mistake here — Slack no longer uses PHP, having migrated its codebase to Hack. Also listing language usage by what’s returned in server headers undercounts languages used on some of the biggest, most popular internet properties. Sites like Amazon, TikTok and YouTube/Google consume a lot of our total attention, but they tend not to report their backend se…

Hack is a “dialect” of PHP created by Meta to be more performant and have types, among other features. So its not like they shifted their codebase to an entirely new language.

It certainly markets itself as a completely different language, though you'd probably expect that.

On one hand I'm almost positive that someone who's made the transition from PHP to Hack would point out that it's way more cumbersome to switch than you're making it out to be but on the other I have no personal experience with it and I would assume that set is small enough where we might have issues finding one to inform us here.

Re: An Internet of PHP

#323
post #310
post #309

Earlier quoted context omitted.

Once again: just use === If you decide languages based on minutiae like this, I can only pity you.

=== works for equality (if you actually remember to use it), but how about comparison? There's no strict version of <.

strcmp

Re: An Internet of PHP

#324
post #130

Earlier quoted context omitted.

I was job hunting this year, I'm a long-time PHP developer (since '99). It wasn't the language, it's everything around it. It's knowing frontend and how it works, it's knowing about cloud/operating systems, databases, 3rd party integration, IAM, SSO and the list goes on. These skills are applicable everywhere, next to any language. Compensation I was offered revolved around the ability to be non-invasive towards youn…

So are you saying that you didn't see a salary difference between PHP roles and C# or Java roles? I've said before that I think modern PHP + tools can be very productive but smart/good developers will find that CV/Salary pressures steers them away from PHP.

> So are you saying that you didn't see a salary difference between PHP roles and C# or Java roles?

No. What I said was that language was not as relevant as the complete engineering ability that makes someone a valuable (financially viable) employee.

> but smart/good developers will find that CV/Salary pressures steers them away from PHP

I never met a person who entered world of IT with the criteria that you highlighted there. My recent experience shows that people enter IT/development based on salary alone, not based on research they conducted taking into account industry they'd work in, language features etc.

If this case you wrote of actually existed, world of software would be a place of much more high quality software and not of "it barely works" projects that resemble Frankenstein's monster.

Re: An Internet of PHP

#325

Earlier quoted context omitted.

Well, it seems like a good part of the analyzer is about some "leaks" or specific behaviors from a language that could give us some tells about what technology is used. I checked Wappalyzer's code (at least the last commit before it went private: https://github.com/dochne/wappalyzer ) and PHP gives more tells ( https://github.com/dochne/wappalyzer/blob/main/src/technolog... ) than Python for example ( https://github.…

PHP probably gets used in low-price shared hosting setups or managed hosting more than other languages, where those tells will show up because the developer can't change the Apache or PHP configuration files. And of course the big PHP numbers come from WordPress, which has its own tells. Developers don't necessarily choose WordPress -- the customer chooses it or starts with it and that's what developers have to work…

> I don't get how other developers get so invested

That's because your investment is means-to-an-end. For others, such as DHH for example, their chosen language is a means of expression and consequently they have a very strong personal investment. The Ruby and Clojure communities, for example, largely consist of developers who have a very strong personal attachment to the language and that's understandable since these languages are much more expressive whereas a language like Java will tend to attract developers who see it merely as a tool and maybe use it because it is a market leader. Languages like Ruby and Clojure demand a broadening of the mind so tend to attract users who are looking for more in a language than the standard fare of Algol-based features.

Re: An Internet of PHP

#326

Earlier quoted context omitted.

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.

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

Yup. That's why I am saying that in the past .htaccess used to be used, but modern php frameworks no longer rely on it. Poor phrasing on my end.

Re: An Internet of PHP

#327

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…

Agreed, these stats should always include the servers for which they could not determine the language - anything else is just lying with statistics.

Re: An Internet of PHP

#328

Earlier quoted context omitted.

Maybe I'm missing something, but I disagree with the tooling comment. Composer is horrendously slow, taking on the order of multiple minutes just to do a update often times. This is just my experience, but I'd much rather take mix, cargo, or yarn any day. xdebug, while it works, also feels antiquated. Trying to get it working in a new system or project can take quite a while. Again, compared to python or node's debug…

composer 1 was slow, composer 2 (released 3 years ago) is fast

I'm on composer 2.5.8

Re: An Internet of PHP

#330
post #324

Earlier quoted context omitted.

So are you saying that you didn't see a salary difference between PHP roles and C# or Java roles? I've said before that I think modern PHP + tools can be very productive but smart/good developers will find that CV/Salary pressures steers them away from PHP.

> So are you saying that you didn't see a salary difference between PHP roles and C# or Java roles? No. What I said was that language was not as relevant as the complete engineering ability that makes someone a valuable (financially viable) employee. > but smart/good developers will find that CV/Salary pressures steers them away from PHP I never met a person who entered world of IT with the criteria that you highligh…

That's very interesting.

My experience in London/UK market is that offered salaries are based on market rates based on keywords including tech stack. And I know a decent number of competent developers who deliberately moved away from PHP because of the lower offered salaries. It might just be the local ecosystem which imo doesn't really value engineering roles in general

Post reply on HN