What is so bad about PHP?

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

45 Replies - 25295 Views - Last Post: 24 August 2012 - 07:46 PM

#1 Elihu5991  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 06-January 12

What is so bad about PHP?

Posted 14 August 2012 - 03:30 PM

I've been hearing from several sources that PHP is a poor language, despite its ubiquity. What are your thoughts?
Thanks in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: What is so bad about PHP?

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4334
  • View blog
  • Posts: 12,131
  • Joined: 18-April 07

Re: What is so bad about PHP?

Posted 14 August 2012 - 03:34 PM

*
POPULAR

There is nothing truly wrong with it. There is just a growing belief that PHP is becoming an amalgamated set of misc functions and features. That is lacks a bit of a consistent style that is common to most other languages.

And while I do share their views to a point, I do find the language very versatile and great for web utilities and sites. It is well established, has over a decade of testing and content written about it and I would still recommend it to others wanting to get into web development.

Then of course there is the idea that it is simply not new and whatever is not new must be bad. While the view is completely unwarranted, it is a view many share.

But overall the language is fine and many sites are built with it today.

This post has been edited by Martyr2: 14 August 2012 - 03:35 PM

Was This Post Helpful? 5
  • +
  • -

#3 Elihu5991  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 06-January 12

Re: What is so bad about PHP?

Posted 14 August 2012 - 03:39 PM

Valid point, but just because a lot of people use it, doesn't mean it's fine. That wisdom is also applicable in many other facets of life.

Why would you recommend it?
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4334
  • View blog
  • Posts: 12,131
  • Joined: 18-April 07

Re: What is so bad about PHP?

Posted 14 August 2012 - 04:14 PM

Actually in programming circles if a lot of people use a language, it "usually" means it is fine. Most programmers who don't like a language drop it and it never gets any steam to begin with. Which is why many great languages like C last so long and are still widely used. There are probably ten languages a day being created and most die on the drawing board because of lack of adoption by those who don't like it.

Why I would recommend it is because it is easy to get started, you can use OOP or not with it, you don't have to write a full page in it (sprinkle it a bit in the HTML) but is also complete enough to pretty much do anything you want with it. Again, very useful as a utility language for joining other things together.

P.S. A language is only as good as the jobs it is suited for. I sure hope you don't plan to turn this thread into "which language is best" because I am sure that will get this thread shut down fast.

This post has been edited by Martyr2: 14 August 2012 - 04:16 PM

Was This Post Helpful? 0
  • +
  • -

#5 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1253
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: What is so bad about PHP?

Posted 14 August 2012 - 04:49 PM

*
POPULAR

I think part of the reason why PHP is so hated is the sheer amount of terrible material you see everywhere on the web.

Take me for instance, I've been writing code professionally for over 4 years and just recently landed a job using PHP. Google has failed me, not because it can't find resources, but because the crappy resources out there far outweigh the good resources. Worse: I have no idea if what I'm reading is terrible PHP code.

The barrier of entry for PHP is so low that literally anybody can whip up a fully functioning website.

And that's one of PHP's strong suits! I really like it! :) Coming from a .NET background, I enjoy being able to
hg push
my changes to production - instead of compiling, deploying, etc.

Don't listen to the hivemind on this one, there's a reason why PHP is so ubiquitous online. :)

If you're starting out, do not read online tutorials. They suck. Period.

Do yourself a service and use a recent book and learn from that.

Take a look at this when you can, it's a good resource as well:
http://www.phptherightway.com/

This post has been edited by Sergio Tapia: 14 August 2012 - 04:54 PM

Was This Post Helpful? 9
  • +
  • -

#6 EmiT FliX  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 05-August 12

Re: What is so bad about PHP?

Posted 14 August 2012 - 07:46 PM

hmmm, as I'm not a PHP expert or anywhere near that level I can only say what I know.

But Sergio pretty much explained it for me. Reading online tutorials, gives you code, not help, or anything else, just the code, and, they don't allow other examples...

One example

Oh here's the code to do your registration page, I will detail each line...they forget to mention that if you want to implement this type of code in a different design that you have to go and completely screw yourself because there's nothing else but the code they gave you.
Was This Post Helpful? 0
  • +
  • -

#7 Cbeppe  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 31
  • View blog
  • Posts: 215
  • Joined: 16-September 09

Re: What is so bad about PHP?

Posted 15 August 2012 - 09:58 AM

This is also a very good online PHP tutorial. I think it's written by Dormilich from DIC and he is one of the absolutely most knowledgeable PHP experts I've seen here.
Was This Post Helpful? 0
  • +
  • -

#8 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,236
  • Joined: 08-June 10

Re: What is so bad about PHP?

Posted 15 August 2012 - 10:55 PM

lol, what a reputation ...

I can assure you that I didnít write or help write any of the QuakeNet tutorials. I may be old, but in turn not that old (meaning I used those tutorials myself when learning PHP).
Was This Post Helpful? 0
  • +
  • -

#9 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,205
  • Joined: 19-January 10

Re: What is so bad about PHP?

Posted 15 August 2012 - 11:31 PM

I agree with the whole "don't follow online tutorials". One of the worst parts about PHP is it is very easy to do things the wrong way (and it still works). I find mysql tutorials to be the worst offenders. So many tutorials don't practice sanitizing their inputs and they use the ill-advised mysql_* functions.

Also, not sure how to describe this, but a lot of functions don't follow the same coding style. I have to consult the manual a whole lot of times because some functions order their arguments like X, while others do it like Y.

This post has been edited by creativecoding: 15 August 2012 - 11:45 PM

Was This Post Helpful? 1
  • +
  • -

#10 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,236
  • Joined: 08-June 10

Re: What is so bad about PHP?

Posted 15 August 2012 - 11:36 PM

View Postcreativecoding, on 16 August 2012 - 08:31 AM, said:

Also, not sure how to describe this, but a lot of functions don't follow the same coding style. I have to consult the manual a whole lot of times because some functions order their arguments like X, while others do it like Y.

Mostly due to the backwards compatibility problem. you can choose to make PHP backward compatible, so that you donít require the latest (or a specific) version to run your code, or you unify the function calls and drop compatibility.

either way, a shot in the foot.
Was This Post Helpful? 0
  • +
  • -

#11 Cbeppe  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 31
  • View blog
  • Posts: 215
  • Joined: 16-September 09

Re: What is so bad about PHP?

Posted 16 August 2012 - 04:19 AM

View PostDormilich, on 15 August 2012 - 11:55 PM, said:

lol, what a reputation ...

I can assure you that I didnít write or help write any of the QuakeNet tutorials. I may be old, but in turn not that old (meaning I used those tutorials myself when learning PHP).

My mistake...
Could have been worse though.
Was This Post Helpful? 0
  • +
  • -

#12 Elihu5991  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 06-January 12

Re: What is so bad about PHP?

Posted 16 August 2012 - 06:33 AM

I appreciate your thoughts, everyone; but it doesn't adequately explain the pros and cons. I still don't completely know why people gravely dislike or passionately love it php.
Was This Post Helpful? 0
  • +
  • -

#13 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,236
  • Joined: 08-June 10

Re: What is so bad about PHP?

Posted 16 August 2012 - 06:35 AM

View PostElihu5991, on 16 August 2012 - 03:33 PM, said:

I still don't completely know why people gravely dislike or passionately love it php.

me neither, I guess itís a people thing ...
Was This Post Helpful? 0
  • +
  • -

#14 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,518
  • Joined: 23-August 08

Re: What is so bad about PHP?

Posted 16 August 2012 - 06:42 AM

Opinions are like assholes...everyone has one and they all stink.
Was This Post Helpful? 2
  • +
  • -

#15 Elihu5991  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 06-January 12

Re: What is so bad about PHP?

Posted 16 August 2012 - 07:11 AM

Yes, but I'm trying to see things from other people's perspective.
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »