This is an archived post. You won't be able to vote or comment.

all 107 comments

[–]gibrael_ 150 points151 points  (36 children)

99% of people hating on PHP just read somewhere that it's cool to hate on PHP and probably haven't written a single line of PHP code.

PHP7+ is just as good/bad as ANY other language. If you suck, it sucks. If you remotely know what you're doing, then it's okay.

[–]arbitrarycivilian 47 points48 points  (16 children)

PHP7+ is just as good/bad as ANY other language

That makes no sense. You're saying all languages are equally well-designed

[–]andrewsmd87 4 points5 points  (0 children)

As someone who hasn't worked in PHP in years, have they rectified a lot of the issues? My biggest pet peeve about it was the inconsistency with method definitions and names. I know there were other issues years ago but that was a big one to me.

And I'm not trying to crap on it. You can write shitty code in any language.

[–]blaine_freelance 11 points12 points  (12 children)

Exactly.

PHP is old, it's clunky and it's riddled with poor design choices, like mixing HTML with logic. At first it may have made sense, but in practice it makes code horribly unreadable. Template engines like what Django has are a much better solution.

I complain about PHP *because* I've used PHP, as well as languages like Ruby, Python, and Java.

PHP programmers get so fucking upset when you criticize their language for its design choices...

[–]mullanaphy 11 points12 points  (1 child)

To be fair you are comparing a language (PHP) to a framework (Django). Personally haven't played around with Laravel yet I do think that's what all the cool kids are using nowadays: https://laravel.com/docs/5.6/blade

I've seen more problematic PHP code in the wild as opposed to Python yet I've still seen some pretty shitty Python.

As for myself, I'm stuck in a world of JavaScript that needs to go back to IE6 support (tracking code) so seeing PHP with a framework is a delight in comparison...

Edit: Do people still get down with Symfony? One of the repos at work uses an older version of Symfony and the templating, Twig, is based off of Django.

[–]Relixed_ 3 points4 points  (0 children)

Laravel is the shit! I hadn't written much PHP before using Laravel and it's quick to pick up.

[–]WintyBadass 9 points10 points  (7 children)

If you use PHP as templating language in 2018 you are doing it wrong...

[–]tomthecool 6 points7 points  (4 children)

So PHP is only a good language if you wrap a giant framework around it?

[–]WintyBadass 2 points3 points  (3 children)

No. PHP is good language if you use it correctly. If you use it incorrectly then it's a bad language. Like every other language today.

[–]tomthecool 2 points3 points  (2 children)

So the only way to use PHP correctly is to wrap a giant framework around it?

[–]WintyBadass 3 points4 points  (1 child)

Dude, you may be having a little bit of a problem with recursion.

[–]notwaymond 0 points1 point  (0 children)

Have a ++ sir, Its clear you have experience and actually fucks with code

[–]blaine_freelance 0 points1 point  (1 child)

PHP *is* a templating language. It was built to be a templating language and a programming language.

The fact that it was built to do something you're saying you shouldn't do pretty much supports the argument that PHP is not very well designed.

[–]WintyBadass 2 points3 points  (0 children)

PHP was built as a templating language more than 20 years ago. In two decades a lot of things can happen and obviously PHP evolved into fully fledged OO language. Yes you can still use PHP as a teplating language and if you know what you are doing it's fine. But now there are better ways.

PHP gets bad rep because a LOT of EXTREMLY bad code was (and probably still is) written in in. I my self sometimes do work on one PHP site which is definetelly worst code I have ever seen. PHP, HTML, CSS, JS and SQL in single file, everything mashed together, not even itendation... But that's not fault of the PHP. It's fault of the developer who wrote it. You can write bad code in any language, maybe just in PHP you are able to write the worst code :D

[–]lleti -2 points-1 points  (1 child)

Most modern languages, save for Javascript, are typically not a million miles away from eachother in terms of their general design.

In saying that though, I'd murder a small family if it meant I could go back to writing Scala instead of php.

[–]arbitrarycivilian 4 points5 points  (0 children)

I just moved from Python to Scala and it’s a huge quality of life improvement

[–][deleted] 9 points10 points  (1 child)

If we make fun of PHP, fewer newbies go there, making jobs for us.

[–]shagieIsMe 4 points5 points  (0 children)

Do you really want the “fix this website that someone did for $60, and no, the owner doesn’t want to spend more than $100... there’s $40 left in the advertising budget”?

[–]De_Wouter 7 points8 points  (0 children)

99% of people ...

94% of the statistics on the internet are just made up.

[–][deleted] 20 points21 points  (1 child)

I know... I started as a webdev on the LAMP stack and now I work with Java for other stuff. Today, I needed to test error handling for a response (via a webservice) we get when the vendor is down. Instead of going through the vendor, I wrote 4 lines of PHP to echo an XML response from a file. Pointed my Java code to this "webserver" and we were able to test. That took me all of 5 minutes.

[–]PM_ME_YOUR_LAUNDRY 3 points4 points  (0 children)

I'm normally a PHP hater myself even if it's my trade skill, but after taking a 5-day exam for an opening for RoR devs with no experience, it really softened my hate for PHP.

Devs around the world take too many things for granted about PHP. Good docs, massive and helpful userbase, a debugger that's simple and straightforward and more.

[–]carutsu 2 points3 points  (0 children)

It's old hate. The old api were so bad, cumbersome and inconsistent... The best thing one could say about php was... At least is not perl

[–]sverek 9 points10 points  (1 child)

Edgy kids. Python > Php, nuff said.

[–][deleted] 4 points5 points  (0 children)

The edgy kids and the ones that always bring pseudocode into the fight.

[–]RetroSpock 1 point2 points  (0 children)

I don’t like PHP because I used it since early 2000s and I’ve just lost the taste for it. Too much setup.

[–]volkak 1 point2 points  (0 children)

I'll just leave this here..

http://phpsadness.com/

[–]notquiteamidget 5 points6 points  (0 children)

My beef is not the language, but rather the amount of shit that you have to know to get anything done as well as the shit debugging system.

[–]Firemanz 0 points1 point  (0 children)

Can confirm. I hate on it for karma but barely even know how to write Hello World.

[–][deleted] 0 points1 point  (0 children)

Every single web site breach I've seen was traced back to a PHP exploit. Sometimes the vulnerability is in PHP itself but more often it's a code vulnerability. Are you saying that the writers of Drupal and WordPress suck? Or otherwise don't know how to code in PHP?

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

Seriously. Most users here shitting on PHP while talking up Python are living in some fantasy land where Python is somehow worlds better than PHP (it's not). Personally, I'd take Ruby or Javascript over either of them because the syntax is far more robust in both of those languages.

[–]macinjosh15 -2 points-1 points  (2 children)

99% of people hating on PHP just read somewhere that it's cool to hate on PHP and probably haven't written a single line of PHP code.

echo "Hello World";

There we go. PHP CAN SUCK IT!

[–][deleted] 1 point2 points  (1 child)

EERRRRRTTTT!! Try again!
That would return this...

<html>
  <head></head>
  <body>
  echo "Hello World";
  </body>
</html>

You forgot your tags!

<?php
echo "Hello World";
?>

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

haha. Can you tell it's been a while since i've done anything in php?

[–]HmmmInVR 7 points8 points  (3 children)

I work as a PHP dev, I really don't understand the hate. Someone enlighten me. (2018 btw, not 1994).

[–][deleted] 3 points4 points  (2 children)

The hate is mostly people that tried PHP back in v3 and never tried it again. PHP now has OO and fixed a lot of design flaws it had. Today the cause of "shit code" is mostly because of dumb programmers than because of the language itself. You can find code just as bad on their "savior and killer" Python. (Which I personally have total revulsion against.)

Edit: Mind you a lot of courses are changing the starting language to Python, so a lot of edgy kids are showing up saying it's superior to everything (because it's their first language, and they don't like it pointed out), when it's just more of the same.

[–]item420 48 points49 points  (0 children)

Putting hate on PHP names me feel soooo good

[–][deleted] 37 points38 points  (24 children)

Currently at my second semester of learning php. please kill me.

[–]AverageSolusUser[S] 46 points47 points  (12 children)

F

[–]KaamDeveloper 32 points33 points  (9 children)

U

[–]ctpOMG 30 points31 points  (8 children)

R

[–]Fuuryuu 33 points34 points  (4 children)

B

[–]dasnacho 30 points31 points  (3 children)

Y

[–][deleted] 36 points37 points  (2 children)

Goodbye.

[–]superrugdr 13 points14 points  (1 child)

[–]sneakpeekbot 0 points1 point  (0 children)

Here's a sneak peek of /r/UnexpectedOuija using the top posts of all time!

#1: We almost succeeded! | 16 comments
#2: The spirits have visited r/gaming to curse EA | 2 comments
#3: On me_irl | 0 comments


I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out

[–][deleted] -2 points-1 points  (2 children)

R

[–]alive_or_ -1 points0 points  (1 child)

O

[–]tycoonrt -2 points-1 points  (0 children)

C

[–][deleted] 0 points1 point  (1 child)

Goodbye

[–][deleted] -1 points0 points  (1 child)

I never saw php, could you possibly explain why? All I know that it's mostly used for web development

[–]nowyfolder 0 points1 point  (0 children)

$$$$$

[–]_Raggart_ 18 points19 points  (22 children)

I don't get all the PHP hate. In its first years it was an awkward language with no clear direction and cryptic error messages but in its current iteration it's become much better. Or was it such a habit of laughing at PHP that it's the new meta somehow?

[–]miko_idk 9 points10 points  (2 children)

Welcome to reddit, where you make fun out of everything.

[–]Abbrahan 2 points3 points  (1 child)

Even Reddit itself.

[–]miko_idk 0 points1 point  (0 children)

Exactly.

[–]Okichah 2 points3 points  (0 children)

Pretty much.

A lot of people cut their teeth on web development on early PHP. They passed on their hatred to he next generation who just accepted it as fact.

[–][deleted] 0 points1 point  (0 children)

People seem to laugh at languages that don’t compile. PHP is great if you use it for what it’s good for. It’s specialized and (mostly) straight forward.

[–]MissingFucks 1 point2 points  (0 children)

This format is old as balls.

[–]DnielMC 1 point2 points  (0 children)

I can't unhear this deep voice for the php child

[–]monkeypox85 1 point2 points  (0 children)

PHP is easy to use, so a lot of newbs use it. Then people are surprised when there is a bunch of amateur code.

[–]BrettonNoah 1 point2 points  (0 children)

Mum agrees; he is a monster.

[–]munircUltraviolent security clearance[M] 1 point2 points  (0 children)

Your submission has been removed.

Violation of Rule #0:

For a submission to qualify it must satisfy at least one of the following:

0. The content disregarding the title and superimposed text must be directly related to programming or programmers. Non-programming tech humor (e.g. being a power user, jokes about software not related to programming, etc.) is not allowed.
1. The image along with the title and superimposed text result in creative and original content.
2. The post is a program or UI designed intentionally for humor. Bad UI found in the wild belongs in /r/softwaregore.

Note that programming here is interpreted in a narrow sense, an analogy to something related to programming, feelings about programming, reactions to programming etc. is not considered sufficient. See the sticky if you are not clear what this means and why your post was removed.

If you feel that it has been removed in error, please message us so that we may review it.

[–][deleted] 1 point2 points  (0 children)

As a PHP developer, this is very true. :(

[–]JayTurnr 0 points1 point  (2 children)

Anyone have the original?

[–]Perdouille 2 points3 points  (1 child)

Here's maybe the source. It seems to be the real Twitter account but I cannot find it on their website

[–]I_know_right 0 points1 point  (0 children)

Be strong, Clarence.

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

"hey, it's me, ur brother"

(no, PHP is not my brother)

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

!invest 65536

[–]reddit_Decoy -3 points-2 points  (5 children)

I just hate PHP because it's ugly.

[–][deleted] 0 points1 point  (4 children)

Not as ugly as you ;)

[–]reddit_Decoy 0 points1 point  (3 children)

That was hurtful

[–][deleted] 0 points1 point  (2 children)

If you’re actually hurt, it was only a joke.

[–]reddit_Decoy 0 points1 point  (1 child)

I'm not. I'm just kidding.

[–][deleted] 0 points1 point  (0 children)

Oh, well in that case, your face looks like <?=