Why is PHP hated by so many developers?

General discussion on PHP
swee3875
Posts: 1
Joined: Sat Aug 19, 2017 1:29 pm
Contact:

Why is PHP hated by so many developers?

Post by swee3875 » Sat Aug 19, 2017 1:32 pm

There are many good reasons to hate PHP, and they run way deeper than some inconsistently named functions with misordered parameters. Learning PHP will actually transform you into a worse programmer, and writing in PHP will leave behind a mess that’s a costly nightmare to maintain and clean up after. Here are my top four reasons.

ahma3515
Posts: 2
Joined: Mon Aug 21, 2017 8:44 am
Location: Pakistan
Contact:

Re: Why is PHP hated by so many developers?

Post by ahma3515 » Mon Aug 21, 2017 8:49 am

There are many desirable motives to hate PHP, and that they run way deeper than some erratically named features with misordered parameters. Learning PHP will certainly transform you into a worse programmer, and writing in PHP will depart at the back of a multitude that’s a luxurious nightmare to keep and smooth up after. Here are my pinnacle 4 reasons.

PHP encourages an insecure programming style by using layout. Its very syntax encourages you to splice unescaped values without delay into database queries and HTML output without wondering twice, leading to SQL injection and move-web site scripting vulnerabilities. To write any PHP code that isn’t riddled with these security holes, you need to actively work against this by means of carefully sprinkling your code with calls to capabilities with lengthy names like htmlspecialchars() and mysql_real_escape_string() (that’s proper, make certain you operate the real one!*). If you want any safety from pass-web page request forgery assaults, you want to move enforce it yourself.

ahma3515
Posts: 2
Joined: Mon Aug 21, 2017 8:44 am
Location: Pakistan
Contact:

Re: Why is PHP hated by so many developers?

Post by ahma3515 » Mon Aug 21, 2017 8:52 am

PHP references are brain-damagingly incorrect. I suggest that actually—I understand from non-public revel in that PHP references will damage your mind in ways with a view to make it tougher which will learn the way references and tips paintings in actual programming languages.

alek76
Posts: 5
Joined: Tue Aug 29, 2017 9:57 pm

Re: Why is PHP hated by so many developers?

Post by alek76 » Tue Sep 26, 2017 4:23 pm

Ahma,

When was the last time you looked at the PHP documentation? PHP has improved a lot in the last decade.

Have you seen the new user input filtering extension?

Did you know that you know that all mysql_* functions are now removed in PHP 7? They have been depreciated for years.

It is recommended that we now use MySQLi or PDO instead.

Unfortunately the function names and arguments ordering is still inconsistent and I guess that will always be the case. But it has a bright side - all the legacy code will still work.

anna8760
Posts: 1
Joined: Thu Oct 12, 2017 4:25 pm
Contact:

Re: Why is PHP hated by so many developers?

Post by anna8760 » Thu Oct 12, 2017 4:27 pm

swee3875 wrote:There are many good reasons to hate PHP, and they run way deeper than some inconsistently named functions with misordered parameters. Learning PHP will actually transform you into a worse programmer, and writing in PHP will leave behind a mess that’s a costly nightmare to maintain and clean up after. Here are my top four reasons.
Overall great points :) Share more info if you have...

alex4688
Posts: 1
Joined: Wed Oct 25, 2017 9:33 am
Location: Dubai
Contact:

Re: Why is PHP hated by so many developers?

Post by alex4688 » Wed Oct 25, 2017 10:07 am

good article

petxi
Posts: 12
Joined: Sun Jul 03, 2011 1:00 am

Re: Why is PHP hated by so many developers?

Post by petxi » Sat Nov 04, 2017 6:17 pm

Hello swee3875,
swee3875 wrote:There are many good reasons to hate PHP, and they run way deeper than some inconsistently named functions with misordered parameters. Learning PHP will actually transform you into a worse programmer, and writing in PHP will leave behind a mess that’s a costly nightmare to maintain and clean up after. Here are my top four reasons.
Then I wold like to knnow, in your opinion, what is the programming language beloved by developers ?

I think that every programming language is good at something that another don't

Thanks for your contribution

andr8558
Posts: 19
Joined: Thu Jan 11, 2018 5:45 pm

Re: Why is PHP hated by so many developers?

Post by andr8558 » Thu Jan 25, 2018 9:25 pm

I wouldn't say that PHP is hated. I would say you can use other languages if it gets the job done. For example this sudoku solver is made all from javascript. Isn't it nice to achieve something like that?

emil4700
Posts: 3
Joined: Mon Feb 12, 2018 12:21 pm
Location: USA
Contact:

Re: Why is PHP hated by so many developers?

Post by emil4700 » Mon Feb 19, 2018 11:49 am

Maybe this answer is a little curt, but you might as well ask why anything is hated in software development, usually because of anecdotal experience of bad use of the language, or because of a background that has set in our mind the way things "should" be done.

Ok, I'll elaborate.

In my anecdotal experience people who tend to hate or disparage PHP do so because they are software programmers that desire something different to what PHP actually is. It's this notion that because PHP is a programming language that it should be judged on the same standards and capabilities as the C variations. But really this is like being annoyed that squeezing tomatoes over your chips doesn't give you the same tangy taste as using ketchup.

They're both tomato based, but does that mean you should expect the same experience from both?

Developers traditionally love to take sides, especially when inexperienced and trying justify a lack of a skill set (even though being proficient in everything, even just within the web, feels like a tall order to me). The hate may be based around the language, but it is because of their experiences of how others have used PHP, and how hard/frustrating they perceive it to be compared to their language of choice, that causes that hate. They hate the practice, not the architecture.

PHP may be the most accessible server side language on the web, with that it brings inexperienced (but mostly well meaning) coders. It's easy to look down your nose on this, in the same way some might look down on the poor estate in town. As in life, programming language hate (real hate, not just a preference for another way) is just prejudice. I don't hate the mallet because it *could* hammer in a picture hook if I tried, I just recognise it's not the right tool for the job and leave it at that.

There is the charge that PHP aides poor development practices, but I'd like to call xxxx on that. It lets people get away with stuff that works but doesn't fit with the community agreed standards on how code should look, but if people aren't learning "right" way to code, it's because there is almost no formal education process for web server coding! If your view is that the elite and educated developers who know the right way should be the only ones to create for the web, that's fine, but that's not specific to PHP either.

To summarise. Developers hate PHP because they inherit messy work that they don't want to/don't have the time to try to understand, because they would rather the "compiler" makes everything secure and safe, because they think their's is a perfect programming language style and enjoy creating battle lines, and perhaps even because they fear that something they're paid a premium to do could be done by someone who is freelancing from their bedroom in between final exams. Mostly though developers hate PHP because their priorities on what to hate are severely misaligned!
Source - quora by Lee Griffin, Web developer, political opiner

jeo8842
Posts: 1
Joined: Wed Feb 28, 2018 7:35 am
Location: Dubai Investment Park
Contact:

Re: Why is PHP hated by so many developers?

Post by jeo8842 » Wed Feb 28, 2018 7:41 am

Well explained and analysed the perspective of developers.But I still Love PHP because of its user friendliness.I am using PHP for Lubricants website .It is easy to learn and use.

Post Reply