Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Regarding PHP.
2 points by kyro on Sept 26, 2007 | hide | past | favorite | 7 comments
Every time the issue of language choices is raised and php is suggested, many are quick to speak against learning php. I've gotten the impression that php is something I should stay away from, but I am very interested in learning it. Is it worth learning? What are the advantages and disadvantages? Should I just stick with Python (the only language I know currently)? Many of you also say that php will teach you bad habits. It'd be nice to list them so that I, and perhaps others, can stay clear of adopting such habits.

Thanks.




PHP isn't going to ruin you, but if you're comfortable with Python then why bother?

edit: I should be more clear here. There are lots of good reasons to learn PHP, eg. you want to work on a project or job that uses it.

If you want to learn it to expose yourself to new things, some other language is probably a better choice. If you want to learn it because you think that it's a better choice for a particular application than Python, I suspect you're wrong.


Python and Ruby are great. But if you are interested in PHP and like MVC (such as Rails), I recommend trying Symfony. I use it for a lot of projects. There are still plenty of good reasons to use PHP just as there are any other language. Use what's best for your project. Be sure to consider feature requirements, developer skill sets, and your timeline when deciding.

After enough experience at programming you'll begin to realize understanding 'how to program' is fundamentally different from knowing one particular language or another. It's a logical mindset and way of thinking or problem solving that ultimately matters. Language is just syntax and can be picked up in under 24 hours for most languages once you understand 'how to program'.


It seems like sentiment is slowly shifting away from PHP hatred as more people that understand good programming practice start or return to PHP for whatever reason. PHP lets you use whatever code you want in combination with html and doesn't force you to use the MVC paradigm. As long as you stick to the MVC architectural pattern, you should be fine.


What language does force you to use the MVC paradigm?


Ruby on Rails


erm... Rails is a framework, not a language.


So does python "on" django, but python itself in no way forces MVC.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: