6 ms·
Not trying to bash on PHP or perpetuate the knee-jerk PHP hate, but should we really encourage people to learn PHP? Imagine the effects if the mainstream web d
by awestroke 13y ago
Not trying to bash on PHP or perpetuate the knee-jerk PHP hate, but should we really encourage people to learn PHP?
Imagine the effects if the mainstream web development focus would shift from PHP to some more thought-through language(+framework?). The PHP-development community produces some really great things, imagine all that effort expressed through better and more efficient tools!
- parasight 13y agoWhat about people working with legacy code? When I started at my current employer there was a quite a chunk of code written in PHP so learning some PHP wasn't optional.
- ben0x539 13y agoBut then those people don't need the encouragement, do they?
- Killswitch 13y ago> Not trying to bash on PHP or perpetuate the knee-jerk PHP hate, but should we really encourage people to learn PHP? Too late, you already did. And yes we should. PHP is just as good as Ruby or Python.
- Conlectus 13y agoI would say from a usability / opportunity of employment standpoint they are equal, but PHP seems when working with it far less "designed" than Python and Ruby in my opinion. Things like the inconsistency of single word / snake case / camelcase in method names etc.
- riquito 13y agoMaybe, but the standard library always makes my heart beat faster. We're talking about the language where you have pearls like strcspn, strtr, strstr, strpbrk and at least three different naming styles for the same group of functions (e.g. for strings strtr, str_replace, trim). And good luck with handling non ascii data with the standard library. PHP would need a highly deprecating major version to clean all the rubbish, but it will never happen (see the history of PHP 6.0) disclaimer: I'm a PHP developer (during the day, but at night...)
- astrodust 13y agoNo, it's not "just as good". It's stuck as web development language due to design constraints. Python is useful for a lot more than web scripting, and so is Ruby.
- RyanZAG 13y agoI don't use PHP much - but if you're making a website, why is being able to do things other than make websites important? I wouldn't use Ruby or Python to make desktop or mobile apps anyway.
- astrodust 13y ago"Web sites" are just the tip of the iceberg today, there's a lot more to the internet than just that. For example, if you wanted to add real-time connectivity to your app using something like Socket.IO (http://socket.io/ http://socket.io/) you're basically out of luck in the PHP world (http://stackoverflow.com/questions/6398887/using-php-with-socket-io http://stackoverflow.com/questions/6398887/using-php-with-so...), you'll have to do it in a different language. I think people who invest a lot of time in learning PHP are getting less bang for their buck than they would learning Ruby or Python where their knowledge can be applied to broader disciplines. Do you need to process audio files? Maybe write a quick script to scaffold some Objective-C or Java code for your mobile app? What about writing a persistent process that watches for files on your network, processes them and uploads them to Dropbox? All these things are really easy with Ruby, Python, or even NodeJS, you just glue together a few off the shelf modules and you're basically done. PHP is way out of its element in these sorts of situations.
- xd 13y agoThere is nothing to stop you writing persistent PHP socket servers and there are many examples out there. A quick and easy to digest example of an implementation of memcached in PHP: https://github.com/AndrewRose/cached.php https://github.com/AndrewRose/cached.php
- 13y ago
- dscrd 13y ago> PHP is just as good as Ruby or Python. I don't know if you're deliberately making a disgusting lie, a blatant troll or just lack knowledge. Either way, I wish to state, as someone who has several years of actual professional experience of all three, in very strong terms that this comment is nowhere near the truth. But about the parent's question: I believe that no learning is ever wasted, so go ahead and learn PHP, but it might be a good idea to realize that it's quite unique in how badly designed it is, and that the rest of the programming world does many things differently.
- Segmentation 13y ago> in very strong terms that this comment is nowhere near the truth. It was his opinion, not a fact. Just like this is your opinion and NOT fact.
- dscrd 13y ago> Just like this is your opinion and NOT fact. Well, if that is your opinion, I do apologize.