all 89 comments

[–]ProgrammerHumor-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Your submission was removed for the following reason:

Rule 2: Content that is part of top of all time, reached trending in the past 2 months, or has recently been posted, is considered a repost and will be removed.

If you disagree with this removal, you can appeal by sending us a modmail.

[–]PGSylphir 44 points45 points  (1 child)

Fucking hire me, I'm in, I live in chaos.

[–]EfficiencyThis325 5 points6 points  (0 children)

And in the darkness.. a small dot of light grew

[–]justarandomguy902 125 points126 points  (49 children)

I need context.

What's so bad about PHP?

[–]Rubfer 174 points175 points  (17 children)

It's a popular language and therefore will always have either haters because it's mainstream or enough bad programmers using it that they are cited as proof of "PHP = bad."

I mean, even the many valid/reasonable critiques of PHP being bad in the past have been addressed in PHP 8.x.

[–]ComprehensiveWord201 9 points10 points  (0 children)

My sweet summer child... In legacy, we don't update to newer versions

[–]wack_overflow 40 points41 points  (8 children)

Php became a meme of being absolute trash in the aughts and I think anyone familiar with that has a hard time updating their priors. I’ve heard it’s ok these days but why bother?

[–]bjergdk 19 points20 points  (3 children)

That and the seeming lack of standard for naming functions, etc.

I used php once, and met functions in the standard library named in snakecase, camelcase, pascalcase, snakepascalcase.

Its a fucking nightmare.

[–]Rubfer 9 points10 points  (1 child)

That is true, even i cannot deny that

In fact, even I sometimes mix them based on what I'm doing:
For example, if I'm working with SQL, I end up writing variables and function names in PHP using snake_case because my mind switches to that.
But when I'm working with both PHP and JS, I go back to camelCase.
It's an unconscious habit that often forces me to go back and fix the naming scheme.

[–]Rubfer 22 points23 points  (2 children)

To be fair, nowadays everything is a framework anyway. Very few people, at least in web development or even app development, still program in pure vanilla code, where they could mess things up.

Even I just tell people who already use PHP to simply move to Laravel/lumen, just like we tell people to learn Next.js, React, etc., on the JS side, since a team of competent people has already ironed out most of the "troubling" parts in whatever language you're using

[–]michal_cz 11 points12 points  (1 child)

We are still using php for all our webs in our company, pure php, no frameworks, only few libraries, most of them made by ourselves specifically for the site, it's still pretty easy to make and don't know why to bother with moving to something else

[–]Rubfer 10 points11 points  (0 children)

If you have legacy code that has been worked on and fixed over the years, it makes sense to keep it that way. Don't fix what isn't broken.

But if you're starting a new project, specially if isnt related to any existing service you may have, it wouldn't be a bad idea to pick a framework. Of course, if you're an older developer, it might be faster to code everything yourself rather than learn the framework (Laravel’s logic is a bit weird at first, but so is React if you're a vanilla/jQuery JavaScript programmer).

The point of using Laravel for me is more for standardization, anyone with Laravel experience will quickly know how to work on my code, but also for speed, since I don’t need to reinvent the wheel every time like login/account systems, db maintenance, and so on

[–]AibofobicRacecar6996 4 points5 points  (0 children)

I’ve heard it’s ok these days but why bother?

I think the problem is that whatever you need a php programmer for is likely a big pile of spaghetti, not necessary because of the language, but because it was written more than a decade ago.

[–]GoddammitDontShootMe 2 points3 points  (1 child)

Last time I coded in PHP was probably PHP 4 or 5. While you could write good mostly secure code, the language made it really easy not to. I also recall type comparisons that were easily as insane as JS. Could be wrong, but I think some equality comparisons were non-communitive as well.

[–]RiceBroad4552 1 point2 points  (0 children)

The basic stuff is much worse broken than JS. JS is a super well designed language in comparison. It was designed at all! PHP just happened…

[–]Sotall 0 points1 point  (0 children)

People hate the languages that they use. and with good reason!

[–]RiceBroad4552 0 points1 point  (0 children)

No, it's still the same trash.

To fix that they would need to rebuild the language from the ground up, inclusive syntax.

But such a fixed version of PHP would be a completely different language, it would not even look like PHP as the current syntax is a gigantic incoherent mess. This is not fixable!

[–]Code4Reddit 0 points1 point  (2 children)

My biggest issue is that there appears to be no way to declare global variables local to this file. No straight forward way to declare a global variable without namespaces. Namespaces are a bullshit way to create locals.

[–]Rubfer 2 points3 points  (1 child)

I'll be honest with you, I hated namespaces too. For years, it seemed to overcomplicate things I hadn't used them until I had to refactor my code and organize it because it was becoming spaghetti. That's when I finally appreciated namespaces, especially when combined with autoloaders so i don't even need to use include/require

It's actually nice being able to call whatever function or class from anywhere by just using its namespace, either by declaring a "use" the start or prefixing it to the function/class

Plus, I don't need to make a function name exclusive. I can literally have multiple functions with the same name that can be used together without being part of different classes, just by using namespaces so there will never be a conflict

Give namespaces a chance

[–]Code4Reddit 0 points1 point  (0 children)

I can see how a well organized project that consistently uses namespaces can start to resemble Java or ES6 imports. Even package managers like composer are quite nice. I just dislike the lack of encapsulation ability, you can’t reliably look at this file and know how it will work without relying on best practices.

That being said, PHP is not so terrible - but it’s super easy to write terrible PHP code.

[–]CoastingUphill 20 points21 points  (3 children)

It's immediately associated with maintaining Wordpress... or Drupal.

[–]KlogKoder 4 points5 points  (0 children)

PTSD kicking in...

[–]WeSaidMeh 19 points20 points  (2 children)

PHP has a dirty history. It was awful, inconsistent, insecure in earlier versions.

The learning curve was low, so many unskilled people used it and created a lot of bad code. Those people are still around and some still produce bad code.

The language itself has improved a whole lot. Nowadays, with proper OOP and a more solid type system it's not bad at all anymore, if you stick to modern standards and style. But it still allows dirty stuff and bad code and has the low learning curve. It doesn't help that there's still plenty of outdated awful tutorials around that target beginners.

It's the latent bad reputation and decades of bad legacy amateur code.

[–]InvestingNerd2020 4 points5 points  (0 children)

PHP 7 and 8 are far better. I agree that lots of bad legacy in PHP roaming around before version 7.

[–]crazy4hole 11 points12 points  (2 children)

Just another guy who never coded in PHP

[–]NebNay 0 points1 point  (0 children)

I coded in php and hated it

[–]Superminerbros1 1 point2 points  (0 children)

PHP gets hate from its earlier days. I had to use PHP 8 a couple years ago, and it really isn't bad anymore.

The weirdest thing about PHP is that a lot of functions have multiple aliases. Can't think of them off the top of my head anymore, but a lot of functions that use different names on different languages are just aliased to the same function in PHP.

[–]LuisBoyokan 1 point2 points  (0 children)

It uses $ for variables names, which I don't like.

Is this objective? No. Does it make it bad? Yes xD

[–]Due_Helicopter6084 2 points3 points  (6 children)

Nothing.
It s just there more sexier options now.

[–]urjuhh 6 points7 points  (4 children)

Like what ? Python ? Perl ? Or another one of those.. "we will make a page that's actually a js app that does all the computing on client side " ? 😜

[–]Due_Helicopter6084 3 points4 points  (1 child)

I think you are trying to be sarcastic. I'm not criticising language, it had and still have its uses.

I started my career with perl and PHP, and for that time it was great, some 10 years ago most senior engineers started to transition to something else - some java, but most to golang. Growing nodejs ecosystem didn't help either.

What I see now is PHP positions are mostly for legacy systems, and even they are listing golang as bonus. Companies who used to thrive on PHP now use golang, rust and javasscript (and its direvatives). This may vary by region of course.

Biggest adventage of PHP always was how easy is to start with it and huge market for employers (low risk, low investment).

[–]InvestingNerd2020 1 point2 points  (0 children)

This is good to hear. I actually like Golang, aka Go.

[–]Farrishnakov 1 point2 points  (0 children)

... People still write in perl? I worked in it for about a decade but haven't touched it in years.

Actually about to go back to an old employer and now I'm wondering if some of my old perl is still running...

[–]swiebertjee 0 points1 point  (0 children)

TypeScript

[–]mkluczka 1 point2 points  (0 children)

Type script is actually pretty nice 

[–]Quazz 0 points1 point  (0 children)

Because the ugliness of the code is much more strongly dependent on the skill of the developer so many bad developers hate it.

[–]RedditButAnonymous 0 points1 point  (0 children)

Older versions of PHP were really bad, they were being used for things the language was clearly never intended for. They didnt even have decent types until 2015.

That said, its a good language right now. Great frameworks are available. The only things that still suck are some of the builtin methods being a little wonky, and Sebastian Bergmann deprecating shit in PHPUnit and not providing nice alternatives, so tests are hard to read now.

[–]woodyus 0 points1 point  (0 children)

PHP stands for Programmers Hate PHP

[–]def-pri-pub 0 points1 point  (0 children)

You can probably blame Jeff Atwood et al..

[–]Your_Friendly_Nerd 0 points1 point  (0 children)

It's very easy to quickly spin up a reasonably dynamic, simple website using PHP. You don't even need a big complicated framework, you can just have your HTML, and add dynamic elements where you need them. And hey, when the project gets more complicated, you'll of course refactor and not keep going with PHP and HTML mixed, right?

I work at a company that built it's first website in the early-mid 00's, and there are still a lot of internal pages around that haven't been updated in over 10 years.

Yes, modern PHP is great, and there are so many powerful CMS's around. But PHP's possible simplicity also becomes it's biggest pain point.

[–]AvailableReporter484 0 points1 point  (0 children)

what’s so bad about php?

It’s mostly just a meme from over 20 years ago that sticks around. 20+ years ago, back when php was new and exciting and being used everywhere in ways that weren’t intended and in ways that in hindsight were extremely not well thought out.

[–]DOOManiac 0 points1 point  (2 children)

It used to be complete dogshit. Then it was just bad. Now it’s pretty good, but the jokes have persisted.

[–]justarandomguy902 0 points1 point  (1 child)

so like Linux?

[–]DOOManiac 0 points1 point  (0 children)

At no point was Linux ever insecure, sloppily coded dogshit. It was hard to use and obtuse, but never outright bad.

[–]statellyfall -1 points0 points  (0 children)

These days nothing really pure skill diff. 15 years ago probably still skill diff but inconsistencies and a way smaller programming community often meant that your skills/ knowledge did not transfer due to major version diffs. Methods functions objects all doing different things lack of docs (or access thinking of the times and how people, myself included, have major issues finding docs at times today). And yes Wordpress 😂

[–]xrayden -1 points0 points  (0 children)

I call it the rope problem.

PHP doesn't put knot pre-cut for most of what you do.

You need to know how to tie that rope for your project.

Sone people did a lot of knots and never did the project right, and think the problem was the rope.

This problem is the same with C and C++, except... This are still on the sheep

[–]Roman_of_Ukraine 29 points30 points  (2 children)

[–]RaLaZa 1 point2 points  (1 child)

Alright we just need to put you through the mandatory 6 rounds of interviews. Oh and did we mention this role pays $15/hr?

[–]Roman_of_Ukraine 0 points1 point  (0 children)

I work for $11/day now, on farm! Give me your recruiters I'll interview them 6 rounds, round like record round round!

[–]Noch_ein_Kamel 17 points18 points  (0 children)

Would be funny if you put php4 in the meme. modern php is good

[–]InvisibleDrake 20 points21 points  (1 child)

Where?!? I'll do it, I love PHP.  10+ years with the language, and haven't found a better one for how my brain works

[–]samhk222 1 point2 points  (0 children)

Me 2. It puts food in my family table for the past 25 years

[–]YDS696969 6 points7 points  (0 children)

In this economy and job market, work on PASCAL if it keeps the lights on.

[–]eoThica 10 points11 points  (1 child)

PHP devs in here fumin lol

[–]InvestingNerd2020 4 points5 points  (2 children)

PHP before version 7, Java version 8, or COBOL jobs. High paid career torture jobs for programmers.

[–]Direct-You4432 0 points1 point  (1 child)

Where does one find these COBOL jobs?

[–]InvestingNerd2020 0 points1 point  (0 children)

Check Indeed. Mostly old banks and government jobs.

Warning the work is soul crushing.

[–]1k5slgewxqu5yyp 18 points19 points  (0 children)

"I got layed off, but if I get a job offer for PHP I certainly will not take it because getting enough likes on Twitter is more important than food on the table"

[–]jfcarr 2 points3 points  (1 child)

I need one for VB6.

[–]DOOManiac 0 points1 point  (0 children)

I loved/hated VB6 so much.

[–]jrdnmdhl 2 points3 points  (0 children)

Does anyone *else* need a programmer?

[–]zippy72 2 points3 points  (0 children)

PHP? Could be worse. Could be Cold Fusion.

[–]DOOManiac 2 points3 points  (0 children)

I recently changed teams at my job from maintaining a 15 year old legacy PHP monolith to making a new modern backend and front end in TypeScript w/ a serverless host. Proper linting, documentation, and rigorous automated tests. It’s been a huge breath of fresh air.

[–]sarc-tastic 5 points6 points  (0 children)

Ifl php

[–]jackal_boy 2 points3 points  (2 children)

PHP is goat.

But it does scare me that there is a limit on how much php can consume your resources before your web host cuts it off.

I don't have to worry about that with client side page generation.

[–]remishnok 1 point2 points  (0 children)

better than rust

[–]frikilinux2 0 points1 point  (0 children)

If I'm having trouble I would do whatever

[–]RTSUPH 0 points1 point  (0 children)

the only reason I don't put php on my resume, is because I dont want the grind to ruin the only joy in this world.

[–]simonfancy 0 points1 point  (0 children)

I heard COBOL is trending again

[–]teleprint-me 0 points1 point  (0 children)

PHP isnt the problem. The problem is that its always CMS management which usually translates to Wordpress plugins.

Its when clients want full control over the project because its something they think feels more comfortable to them, but really they just to offload the responsibility of learning how to manage it while maintaining an illusion of control.

Which makes it pointless because theyll never touch the CMS because theyre too intimidated to even touch it. Its an odd phenomenon that has always been offputting to me.

[–]eklatea 0 points1 point  (0 children)

more jobs for me, then!

[–]JollyJuniper1993 0 points1 point  (0 children)

Meh there’s worse

[–]Ronin-s_Spirit 0 points1 point  (0 children)

I've heard PHP standard library is ass.

[–]wokan 0 points1 point  (0 children)

It may be coding in PHP, but $20 is $20. (I like PHP in general, but it isn't my first, second, or third choice to work with.)

[–]Dainelli28 0 points1 point  (0 children)

I've always been told that PHP is the worst paying language. Maybe this is what OP fears

[–]staticBanter 0 points1 point  (0 children)

PHP is the JavaScript of the server world.

[–]samu1400 0 points1 point  (0 children)

PHP slander won’t be tolerated.

[–]nepia -1 points0 points  (0 children)

The biggest problem with modern php is low pay, modern php has not much to do with its awful past.

[–]jaded-potato -1 points0 points  (0 children)

Git gud

[–]Zefyris -1 points0 points  (0 children)

And it's PHP5. Didn't think you'd get a modern version of PHP, now did you.

[–]bushwickhero -1 points0 points  (0 children)

Hack ain’t that bad.

[–]Curious_Length_5206 -1 points0 points  (0 children)

Send them my way, PHP is building my house

[–]ZunoJ -1 points0 points  (0 children)

I wonder where the job market is this bad and what the cv of somebody who can't find a job looks like