4 ms·
PHP is probably the language with the best return on investment (of time spent learning) currently. It is extremely easy, and is fast to prototype stuff because
by antirez 13y ago
PHP is probably the language with the best return on investment (of time spent learning) currently. It is extremely easy, and is fast to prototype stuff because of the high level nature. While the language is not as expressive as other languages such as Ruby or Python, it is easy to move on later, but PHP provides everything to get things done and deploy easily your simple application in minimal time.
A lot of good programmers today started their web experiences with PHP. Now probably they are using the latest cool thing, but it served as the "BASIC" of our times, and is still active and trying to fix its issues.
Also, and this is not a PHP merit, but a disaster with other dynamic languages such as Ruby, the performance you get by default with a simple PHP application, is good enough that is almost always the DB to blame, not the front-end, when there are issues under load.
- shubhamjain 13y agoI have been a PHP programmer since long and while I do wish to go up for Django or RoR but I usually get put off by the amount of time I need to spend getting around both. On the other hand, it is so easy to get started with any PHP framework (except Zend, of course) and thats what I love, easiness to get encouraging productive output but seeing the people's prejudice, I feel that I would have to more or less go up for them. I hate the fact how difficult is to associate yourself as "good PHP developer" amongst clueless 3$/hr script kiddies but if you are able to call yourself as a Django developer, you are automatically in the category of a good programmer.
- antirez 13y agoThe problem with a low barrier to entry is that there is less filtering, so you get very bad programmers claiming to be experienced developers. However a good programmer can surely use PHP constructs (that are not so much different than the ones offered by other languages at the same level of abstraction) to provide modular and easy to manage code. If the customer wants the cheap developer, she or he will later learn that there is a real difference, and next time will be willing to pay more, as it is actually a way to pay less in the long run...
- possibilistic 13y agoLearn Python and/or Ruby. Not for the salary bracket it will put you into, but for the horizons it will broaden in terms of how you understand programming. Don't learn Django or RoR either. You'll just be solving the same problem in a different way. Intead, try something entirely new--write a chat or job server with Twisted, try your hand at image processing, write some ML classifiers, and so forth. It's not as hard or out of reach as you'd think. Imagine a fun problem to solve--something you've always wanted your computer to do (perhaps something that irks you, that you want to automate) and just do it! You'll find yourself in that "other category" without that having been your objective at all, and you'll have much more to show for it.
- drivingmenuts 13y agoI spent some time learning Python and Django to some degree. Python is easy and I wish I could write more in it. Django felt less awesome, but still pretty good, except when it came to deploying it on my web hosting (Dreamhost). At the time, they only sort of supported it. But I always fall back on PHP. I know it - it works, warts and all. It's maybe not a great scripting language, but it's a good one and it has the advantage of being almost ubiquitous.
- ris 13y ago> I do wish to go up for Django or RoR but I usually get put off by the amount of time I need to spend getting around both Is this a joke? If not I think it heavily reinforces my view of PHP developers and clueless & lazy.
- Thunderer 13y agoWhy clueless and lazy? We know the strengths and weaknesses of PHP and other programming languages. Thing is, while we really do appreciate what others offer it's still easier / cheaper / better (choose whichever sounds good to you) to "import" good ideas from <insert language> than to change whole stack.
- ris 13y agoClueless and lazy because the amount of time to "get your head around" django and python is so absurdly minimal for anyone who has done any web development at all. It is incredibly straightforward, and finding that "too much" pretty much disqualifies someone from being a competent developer.
- shubhamjain 13y agoI don't wish to take it personally but these kind of remarks make me furious. Should I build you something in Django if thats what it takes to show you? because I am sure I will. By getting my head around, I didn't necessarily meant I was too foolish to understand anything but I had my problems. There wasnt any default schema for urls, each route needed a new one, managing database and creating tables required a console based code generator, setting up django with apache required an effort, the abstraction of app vs website was quite peculiar, and some other issues I don't recall. Call it my ignorance, stupidity, daftness that I failed at so basic stuff but thats my side of the story.
- ris 13y agoApp vs website is bizarre the first time you encounter it - in my mind it would have been better them calling "projects" "deployments". The first time I worked with django I developed my application/project inside-out. But the second time, I didn't. > Should I build you something in Django if thats what it takes to show you? What the hell does it matter what I think?
- ma2rten 13y agoI don't believe that PHP is faster than Ruby. I think it's just that Ruby on Rails is a rather fat framework.
- sbarre 13y agoThe problem with that attitude is that real-world usage is what matters if you're benchmarking or evaluating for your own use. The vast majority of people who use Ruby for web development are using Rails (because Rails is a large part of what makes Ruby effective and attractive for web development - in general, YMMV), so you can't make realistic performance comparisons without comparing commonly-used stacks. Otherwise it's just a useless pissing contest.
- hadem 13y agoIt's refreshing to see a positive comment about PHP at the top of a HN discussion!
- jwblackwell 13y agoAlso, despite all the naysayers PHP's going through a bit of a revival at the moment. It's certainly not dying. It's recently got Composer as an awesome package manager, the Laravel 4 framework, new features like short array syntax, closures etc and support from more PaaS (e.g. Google App engine). The community is really getting behind all this as well, which will help bring up the reputation. I'd still recommend anyone to learn PHP as their first programming language. It's still the easiest to hack your first idea together, there's more jobs than any other language and the standard of code is improving now the language has the features and infrastructure it needs.
- ma2rten 13y agoIf someone wants to learn webdev, I would recommend javascript as a first language. Just use something like parse/firebase and you don't need sever-side at all.
- debaserab2 13y agoPHP isn't going through any sort of "revival" stage or surge in growth. Composer is a cheap clone of NPM with horrible performance (don't believe me? wait until you're in production with 20+ composer dependencies). Closures have been around for over 3 years now. Laravel brings nothing new to the table that wasn't already there before it's existence (and dear god I hope no more of the pretentious Ruby "artisan programmer" attitude continues to bleed over). The reason PHP is not dying is because in SPITE of having a sub-par language syntax, inherently flawed security design, and the newer "me-too" bolted-on features you mention, it still continues to be dead simple to install, learn, and get a working proof of concept up and running. Good ideas become proof of concepts become a sold product quickly with PHP.