News for hackers. Stuff that matters.
Re:PHP in 2019 by StevePerkins on Wednesday May 15, 2019 @08:08AM (#19918578)
On one hand, I do see that HN (and probably Reddit) live in a bubble. Where most of the darling languages and tools have very low use in the real-world. And where most of the languages and tooling that actually run the real-world go un-discussed, or simply dismissed, because they're boring and don't appeal to students and entry-level devs working on side projects. I realize that the perspective most rookies get from these forums is completely distorted.

On the other hand, I ALSO think that PHP is only still relevant because of WordPress. The business world runs on Java, and .NET to a lesser extent. I see job postings for Python all the time, as it and the JVM run the worlds of data science and big data. One can even still make a thriving living with Ruby. But I just don't see any recruiter activity around PHP at all. And whereas my Java shop will hire Python or Node junior devs, on the theory that they can learn, we would more likely to skip over a PHP-based resume (if we ever actually saw any).

Re:PHP in 2019 by cbdumas on Wednesday May 15, 2019 @12:05PM (#19920759)
Often when there is a post about PHP I read over these treads sort of subtly trying to figure out how a language with such a large user base has remained basically invisible to me. And I don't think I live in the HN bubble, though I do use a lot of Python, in my consulting work I've also done plenty of work with .NET, JVM to a lesser extent and other "boring" tech.

But PHP has literally never come up, even as a suggestion or as a tool that is a small part of the company stack or whatever. It feels like I'm looking into a strange parallel universe of software development reading through these threads. PHP devs, where are you?

Re:PHP in 2019 by DCoder on Wednesday May 15, 2019 @01:21PM (#19921647)
Right here! PHP and JS/TS is what I do every day.

PHP has its tentacles all over the web: WordPress and Drupal are immensely popular for simplistic sites and short-lived promotionals, Magento and WooCommerce attract many e-commerce users, and Symfony/Laravel handle the custom stuff. I've worked with all of these and have the scars to show for it.

All popular projects have swarms of consultants offering advice, prebuilt additions, and custom development. (E.g. WordPress plugins and themes are everywhere.) This is also a significant factor for the penny-pinching customer — from their point of view, they avoid vendor lock-in and expensive development this way. (Spoiler: it rarely works out, in the end. "Tower of Babylon" and "shallow learning curve" mix in very exciting ways.) So there are masses of people who know the basics of PHP and call themselves "PHP developers". In my opinion, just a fraction of them actually deserves that title.

Re:PHP in 2019 by cbdumas on Wednesday May 15, 2019 @01:36PM (#19921803)
So I get the sense that PHP is sort of the tool of choice for web development at small or medium businesses which are not primarily software businesses, but are looking to create a website and maybe do some ecommerce? Is that right? If so I guess it makes sense that I wouldn't have seen it, most of my consulting work has been at relatively large enterprises.
Re:PHP in 2019 by hnick on Wednesday May 15, 2019 @09:20PM (#19925334)
Pretty much any shared hosting service (which is the default for a small business not going for a more handheld hosted solution like Squarespace or Shopify) is cPanel enabled with PHP, MySQL (via phpMyAdmin), one-click Wordpress installation, and other similar features.
Re:PHP in 2019 by DCoder on Wednesday May 15, 2019 @02:09PM (#19922100)
It definitely feels that way, yes. I've mostly dealt with small businesses looking for the lowest bidder and medium businesses unable to spend a fortune on software licenses and highly-experienced devs, and PHP fits that segment well.
Re:PHP in 2019 by chx on Wednesday May 15, 2019 @02:07PM (#19922085)
> [WordPress and] Drupal are immensely popular for simplistic sites

That's not a sentence I expected to see. Ever. Drupal is popular for many things but for simplistic sites?

Re:PHP in 2019 by DCoder on Wednesday May 15, 2019 @02:14PM (#19922145)
This may be a regional thing. I've seen Drupal 6/7 on a lot of sites where the original dev threw together five content types in the admin GUI and told the admin how to post new content. It worked well and was certainly less worrisome than seeing (outdated) WordPress.
Re:PHP in 2019 by blowski on Wednesday May 15, 2019 @04:29PM (#19923433)
We run about 1,000 simple websites off the same Drupal codebase. Custom forms, page layouts, etc.
Re:PHP in 2019 by chx on Wednesday May 15, 2019 @09:18PM (#19925322)
So your argument is that a multisite project running a thousand sites off the same codebase containing custom forms and layouts is simplistic? Then, I pray, what do you call complex?
Re:PHP in 2019 by slenk on Thursday May 16, 2019 @12:00AM (#19926026)
Maintaining 1000 servers
Re:PHP in 2019 by Kluny on Wednesday May 15, 2019 @12:59PM (#19921390)
Right here! Started working for a PHP shop straight out of college, and have never been able to get hired for anything else since then.
Re:PHP in 2019 by n42 on Wednesday May 15, 2019 @01:31PM (#19921754)
ever heard of Facebook? Slack? Etsy? WeWork? Box? Yelp? just to name a few.
Re:PHP in 2019 by verbify on Thursday May 16, 2019 @03:27AM (#19926893)
Or mediawiki
Re:PHP in 2019 by oo0shiny on Wednesday May 15, 2019 @12:14PM (#19920864)
Right here! Drupal has been moving into the enterprise sector with their latest release (v8, built on Symfony). I get a lot of interest from recruiters based on my Drupal background, especially lately.
Re:PHP in 2019 by dennispeach on Wednesday May 15, 2019 @05:25PM (#19923922)
Here’s one right here!

In the world I’m in and the journey I’ve taken in my career of being in digital/dev for 10+ years, PHP is what I have based my dev foundations on. (albeit web rather than software)

I am recruiting PHP developers for my team now, and they are out there, but maybe not here?!

We make websites, and not a tremendous amount beyond that bar a few Laravel apps.

I suspect we travel in totally different worlds?!

Re:PHP in 2019 by bartimus on Wednesday May 15, 2019 @02:25PM (#19922261)
I think the bubble has to do with purists vs pragmatists.

I once joined a Java team as a front-end dev (I'm full-stack). They would do the back-end. They had done everything by the book perfectly. Following all the best practices. But the back-end wasn't doing what it needed to do by a long shot. They were stuck. Meaning I couldn't make progress. So I cooked up a simple (temporary) PHP back-end so I could easily build the needed queries. All nicely secured with LDAP. I was literally running circles around their solution. But it was blasphemy.

Eventually they ported my code into Java. Some portions literally one-to-one. Nobody will ever know the critical role PHP played in this Java success story.

Re:PHP in 2019 by c0vfefe on Wednesday May 15, 2019 @03:17PM (#19922733)
Sounds like they needed a better back-end developer, not PHP.
Re:PHP in 2019 by exclusiv on Friday May 17, 2019 @12:09AM (#19936189)
Java guys didn't ship much at my first real gig. Lots of tooling time and watching movies or discussing Star Trek.

I shipped apps in 2 weeks myself that the company got paid ~70k for. And we kept my clients.

Re:PHP in 2019 by ma2rten on Wednesday May 15, 2019 @05:34PM (#19923998)
I don't think so. "The bubble" is more about using shiny new languages like go and rust.
Re:PHP in 2019 by phlyingpenguin on Wednesday May 15, 2019 @08:17AM (#19918638)
I was just talking about with a student who got on to a PHP project with an older developer lead. We decided that PHP is a code smell for a poorly managed project. You know, the kind that were common in the early aughts that featured poor version control practices, no tests, no automation, live changes, live database schema, etc., etc. That's certainly not the way things have to be, but it's never surprising if it is. The root cause is the developer in charge and their reports, but PHP usage is an easy marker to check. We found most examples using other languages (you mention) to be generally better managed in our area/sampling.
Re:PHP in 2019 by lioeters on Wednesday May 15, 2019 @11:48AM (#19920574)
> PHP is a code smell for a poorly managed project

Woo, that's a harsh but honest assessment.. Having lived through countless PHP projects, I'd have to say I agree.

> That's certainly not the way things have to be

As the article pointed out, there are new developments in the language, frameworks, tooling, etc., that support better practices and well-managed projects. It's just that the average codebase still tends to be haphazardly organized, idiosyncratic, bloated, complicated, tough to maintain and extend.

The popularity and evolution of PHP have been impressive, and having used it for years I do have some fondness for it. But at some point, I think it becomes necessary to move on to other languages and systems that encourage best practices from the beginning, with a higher baseline/average code quality.

Re:PHP in 2019 by nikdaheratik on Wednesday May 15, 2019 @10:49PM (#19925734)
Well I've been gainfully employed for pretty much my entire career using PHP and I've never had a problem with recruiters. It really depends on the city, the companies in that city, and the overall market in your region.

Big business runs on Java/.NET, but small-midsized businesses run on a variety of different platforms partially based on the history of their IT department and their development needs.

The bottom line is that you can write a good greenfield web application for a midsized business faster, with less overhead, and with fewer headaches using PHP and a good framework than you can with Java or any of those other tools you mentioned. The tradeoff is that they don't integrate as easily with the huge backend software packages and may not scale as well as Java and .NET. Which is why huge businesses don't run with them as much.

Re:PHP in 2019 by saltminer on Wednesday May 15, 2019 @08:41AM (#19918787)
> PHP is only still relevant because of WordPress

There's also Drupal, which is very common in higher ed.

Re:PHP in 2019 by StevePerkins on Wednesday May 15, 2019 @08:46AM (#19918823)
Indeed, and also Joomla. But the thing with all of these CMS systems is that they're already written. So the related "PHP work" is writing or tweaking plugins for them.

It's kind of like acknowledging the footprint of Microsoft Excel and VBA. Yes, it's quietly a huge deal, and thousands of people hold a job largely because they maintain it for an organization. But it's also the sort of thing one "stumbles into". They don't get hired specifically for that, and it doesn't really transfer to more general developer jobs.

Re:PHP in 2019 by wyqydsyq on Wednesday May 15, 2019 @10:47PM (#19925726)
There's still lots of small-fish web development agencies who specifically hire PHP developers.

That's about it though, I think the web development industry is specifically tied to PHP because of their excessive dependence on WordPress, Drupal etc, this also produces developers who are overly specialised in niches using these platforms at the expense of general capability. Think back to the mid-2000's where there was a big difference between a JavaScript developer and a jQuery developer - while they both wrote JS the latter was generally incapable of using vanilla JS proficiently because their use of jQuery's abstractions as a crutch impaired their learning of the underlying fundamentals. A lot of "WordPress developers" are so heavily specialised in using WordPress they probably can't even remember how to write a vanilla PHP site.

Re:PHP in 2019 by IloveHN84 on Wednesday May 15, 2019 @03:10PM (#19922662)
Isn't Facebook running on HipHop PHP? What about Zalando, one of the biggest platforms out there? They started using Magento and tuning it
Re:PHP in 2019 by foobarandgrill on Wednesday May 15, 2019 @09:09AM (#19919003)
What's wrong with Laravel or Symfony?
Re:PHP in 2019 by StevePerkins on Wednesday May 15, 2019 @09:16AM (#19919051)
I don't know if there's anything inherently wrong with them.

I'm just saying that I don't see any job listings for them as an interviewee, or see any resumes with them as an interviewer. In contrast to other technologies that HN or Reddit declare to be "dead" or "dying", yet actually seem to run the world with no serious disruption on the horizon yet.

Re:PHP in 2019 by nicoburns on Wednesday May 15, 2019 @11:26AM (#19920347)
Are you in the US? There are TONS of PHP jobs here in the UK (possibly second to JavaScript, although there are a lot of Java jobs too), and I hear that in general PHP is very popular in Europe, whereas Ruby is more popular in the US (some people use ruby here, but not many).

Laravel is not only fine, but one of the best frameworks I've ever used. It's like rails/django, but less opinionated in all the right ways (while still providing loads out of the box). I think PHP has a very bright future.

Re:PHP in 2019 by jmondi on Wednesday May 15, 2019 @04:41PM (#19923552)
Where do you live? In the US there are a shitload of PHP and Laravel jobs.
Re:PHP in 2019 by reallydude on Wednesday May 15, 2019 @12:03PM (#19920731)
Laravel and Symphony, in particular, have the terrible code smell of elongated toolchains, that are specific to the frameworks.

> php artisan serve # laravel

> symphony server:start # symphony

Same poor thinking that NodeJS introduced, albeit less offensively integrated.

If you need additional toolchains, you're not using PHP per se, but another meta-language. There's literally no good reason to do this other than to remove the concept of tradeoffs for a "we know better" or "don't worry about it". These frameworks have never added anything that I couldn't do simpler and faster, nor have they provided me with constructive guidance in the design or maintenance of a project.

Re:PHP in 2019 by Kiro on Wednesday May 15, 2019 @01:03PM (#19921443)
Never met a Laravel developer who actually uses php artisan serve. Sounds like you're fighting windmills.
Re:PHP in 2019 by Supermancho on Wednesday May 15, 2019 @01:38PM (#19921830)
> Sounds like you're fighting windmills.

Every Laravel developer uses artisan to do something. They were highlighting the names of the magic binaries.

Of course, every Laravel howto starts with a quick guide telling you to use artisan serve, illustrating the point.

Re:PHP in 2019 by nikdaheratik on Wednesday May 15, 2019 @11:04PM (#19925803)
I can't speak for symphony, but that's just not the way it works in laravel. The "artisan serve" action is used when you want to make a quick demo (maybe). The actual deployment is in an apache server like everything else.

The rest of the actions that use artisan, for the most part, are for creating boilerplate code like database models or empty controllers quickly. They aren't a requirement to use the framework, but are faster and less error-prone than copy/pasting an old empty class file.

The last class of actions that call artisan are for things like cron jobs which you setup once and forget about. Their use case is pretty obvious once you read the manual.

> These frameworks have never added anything that I couldn't do simpler and faster, nor have they provided me with constructive guidance in the design or maintenance of a project.

That's nice to hear, but it's probably not true for the majority of people. The entire point for these projects is to allow programmers to create a rapid prototype for design purposes that can then be iteratively developed into a final product. If they don't make sense to you, maybe it's because you aren't working in that space, and not because the tools themselves are lacking.

Re:PHP in 2019 by ndarwincorn on Wednesday May 15, 2019 @12:05PM (#19920757)
You make a sweeping statement about a bubble and then demonstrate the edge of yours:

> The business world runs on Java, and .NET to a lesser extent.

Flip those.

> I just don't see any recruiter activity around PHP at all.

This is probably true. My own anecdote: I'm at a primarily-PHP SaaS provider in a major tech hub, and for the couple hires we've made in the last year all of our applicants with extensive PHP experience said we were the only PHP shop they'd talked to, many of them over a year into their job search.

Re:PHP in 2019 by Supermancho on Wednesday May 15, 2019 @01:32PM (#19921758)
> Flip those.

Nope. That's just incorrect. From Experian to JPMorgan Chase to Cambia Health to Amazon, Java is the typical case for every project. Look at stream processing tools at netflix via any given youtube presentation about stream processing. There are entire tooling segments where .NET is absent, despite their quality tools that run on Windows. Nobody trusts Windows by default and this has mortally wounded .NET

Re:PHP in 2019 by kthejoker2 on Wednesday May 15, 2019 @04:21PM (#19923343)
Having done a lot of .NET programming at JP Morgan Chase, allow me this Marshall McLuhan in Annie Hall moment ...

I have no idea which language is more popular, but I can certainly list 1,000+ companies including the majority of the Fortune 500 who use .NET in the enterprise.

Re:PHP in 2019 by Supermancho on Friday May 17, 2019 @11:58AM (#19940800)
I have worked for all the companies mentioned, of course. Having done a lot of Java programming at JP Morgan Chase, I can confidently say that Java far outstrips .NET usage. Orders of magnitude.
Re:PHP in 2019 by kthejoker2 on Friday May 17, 2019 @03:31PM (#19942737)
And I can say the opposite is true at Credit Suisse and the Royal Bank of Canada and WalMart and Toyota and Chevron and AT&T ...

What of it.

Re:PHP in 2019 by int_19h on Wednesday May 15, 2019 @10:41PM (#19925698)
Which one is more popular depends a lot on which country you're in, and sometimes even where in that country.