Hacker News new | past | comments | ask | show | jobs | submit login

No, you are not wasting your time. You will read people complain about PHP but in the end, it provides me with a great job that pays the bills and then some! When used properly, it doesn't have to be a bad language and can be fun. That, and if you are just starting to get into web development, it is a great place to start. You can always branch out into other web technologies down the road. Have fun and keep learning :-)



> When used properly, it doesn't have to be a bad language

> That, and if you are just starting to get into web development

These two things don't square well, and is a major reason why I discourage PHP. It's pedagogically suboptimal to be encouraging the sorts of behavior that culturally accepted PHP often does.

You can write good PHP. After many years I got to the point where I could say confidently that I can. But it took me most of a decade to get to that point of confidence.


So what you are saying is that unless you can write good code from day one you shouldn't attempt to use a language, regardless of language?

The code I'd write in say, Clojure day one would be terrible when compared to the code I'd write a year or two later. Does that mean I shouldn't learn and use it?


What bad things are culturally accepted in PHP?


Most common thing that seems to come out is using string concat for sql queries.


Is the last time you even looked at PHP about 6 years ago?

You and yours really need to read up on what you hate so much so you don't look like a bunch of fools arguing about things that don't exist.

That said: There are many projects still using crap like that, but that is because of bad programmers. This stuff is deprecated in core and its use is heavily discouraged.


PHP has always had the option to write good code. It's Turing-complete, you could just write a Haskell interpreter for it if you wanted. The problem has always been that PHP's bad programmers, by and large, are the ones evangelizing the language and writing the tutorials, so anyone trying to "learn programming" via PHP gets heavily exposed to things-only-bad-programmers-do, and never really sees much good code to know that there's another way.


I'm trying to do my part. I'm a mod of /r/php and trim out the crap and promote the good stuff.

Anytime someone new to PHP or not at a higher level asks a question, I point them to proper resources.

I'm in ##php and #phpmentoring on Freenode helping out with questions.

I write articles that are, in my humble opinion, not bad and have received many compliments from people who learned from my writings.

I'm doing my part, and so are many other PHP-centric developers, and it's annoying as hell to have us lumped in with code that's several years old, or sweatshop programmers that know nothing more than the very basics.


Yes, 8 years ago ... PDO and prepared statements is the quasi-standard since the release of PHP 5.1


Please. Stop using sense and UP TO DATE arguments. Everyone who talks negatively about PHP always talks about PHP4... These people are basing their opinions about a language they barely even used a decade ago.. This is annoying.


...if you're lucky to be working in a PHP dev shop that utilises current and proper tech. Most PHP shops that I've had experience with, either directly or through other PHP coders, are mostly stuck with mysql_query esque setups all over the place. If they're lucky, someone wrote an OO wrapper for it.

That being said, it's a small sample size of maybe just over 100 over the last few years. Weigh accordingly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: