Live data from Hacker News

An Internet of PHP

timotijhof.net

1–10 of 333 posts

Re: An Internet of PHP

#5

At the end of the day if your software works and users like it, does the programming language even matter?

It's very unlikely these days for a medium sized and above software project to be written 100% in a single language.

Re: An Internet of PHP

#6
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 out of the box (array_column anyone?).

I think its bad rap comes from its ubiquity. Pretty much any existing website I've had to work on has been a putrid mess. That's just the way codebases go unless you're a SaaS with a CTO who's hell bent on preventing that.

And since most of these putrid messes have been based on PHP, due to it's age and ubiquity, people blame it, due to observation bias.

Re: An Internet of PHP

#7

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…

Bad rap comes from the inconsistency of the early APIs. The ability to interleave code and HTML was also tacky and never taken seriously but I think touted highly by some as a killer feature. The language is very unplanned, go look at an equality chart for PHP, it makes JavaScript blush as well.

Re: An Internet of PHP

#8

At the end of the day if your software works and users like it, does the programming language even matter?

I agree that it should not matter but there are people out there who really have strong feelings about PHP. I understand those strong feelings because PHP was very popular since it was on every shared host and it was super easy to quickly whip up scripts that render dynamic pages back in the day. That ease had consequences that PHP is trying to dig out from under to this day. I personally reach for PHP first for all my personal web projects. It's where I am most comfortable.

I write C++, Rust, Python, C#, and JS in various capacities both personally and professionally and I always go to the first language I learned whenever I want to prototype, PHP.

That said, I agree with the sentiment you are expressing. If the app works, and people enjoy using it, the underlying language only matters to other devs who might work on it and that is it.

Re: An Internet of PHP

#9
I learned how to code when I was a kid with a mixture of C++ my dad showed me on our Dell running Windows 95 and PHP that I taught myself in the years after. All through my teenage years into my early 20s, anything I wanted to make I made in PHP. I still have some PHP projects online, but recently when I want to make anything, I set up an API in Python and build the front with a JS framework.

Is part of this just getting in on the latest trend? Definitely. I like scrolling through trending on Github, ya know?

But I was also just tired of writing PHP. Python is cleaner, so if I can do the more complex backend stuff in that, coding is more fun. I would say PHP and JS are about equally “unclean” but if it’s just frontend all those brackets and parentheses don’t become an issue as much.

Just one experience.

Re: An Internet of PHP

#10

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…

> You wouldn't pick it for your job interview's coding test if you had a choice (Python all the way there),

I do actually pick it for several reasons.

  1. I want to know if the environment I am going into is pragmatic about languages.  If you are going to refuse to continue working with me over something so minor as PHP then we aren't a culture fit.
  2. I want to showcase my best.  I know this language in and out.  It's the first language I learned and I have the greatest ease of building algorithms with it.  I've had interviews where I was asked to do something with PHP that PHP did not support and I found ways to make it work.
  3. In some ways I love the conversation that comes with positive interviews when using it.  Oftentimes the interviewer isn't very familiar and it sparks discussion on the languages benefits and drawbacks further showcasing my skillset.
Sure as we progress along in the interview process I will switch to whatever language the company uses primarily but if I get a choice I always choose PHP.
Post reply on HN