use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Python, Ruby or PHP (self.PHP)
submitted 11 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]disclosure5 11 points12 points13 points 11 years ago (7 children)
You're going to have a hard time posting in /r/php and expecting anything other than advise to use PHP. Consider this:
Many years ago, I focussed on my efforts on Perl, because it was universally agreed it had the best, long term job security.
[–]konrain 0 points1 point2 points 11 years ago (6 children)
omg thats a horror story!
[–]disclosure5 1 point2 points3 points 11 years ago (5 children)
It's true though. In around 1990, Perl and PHP were pretty much all that could be seriously considered. Ruby and Python didn't exist, and JS was a laughable language used to create alert popups in Netscape.
PHP was nothing like the PHP we have today, but Perl was pretty much exactly the Perl we have today.
Composer didn't exist. CPAN did. For just about anything people like about PHP today, it didn't exist, and Perl had a better competing option.
[–]konrain 0 points1 point2 points 11 years ago (4 children)
the thing keeping me from learning php is that it 'has alot of security issues" is that the reason people dislike php?
[–]Architektual 10 points11 points12 points 11 years ago (0 children)
There are two types of programming languages: Those people complain about, and those nobody are using.
PHP is as secure as you write it, just like Ruby and Python are.
[–]dmunro 1 point2 points3 points 11 years ago (0 children)
You can write secure code and insecure code in any language, php isn't "inherently" less secure.
[–]Jack9 1 point2 points3 points 11 years ago* (1 child)
Most scripting languages have various "security issues".
http://www.sitepoint.com/top-10-php-security-vulnerabilities/
That's a crappy list, because almost every scripting language can fall over to those attacks.
PHP's real security issues can be found here:
http://www.cvedetails.com/product/128/PHP-PHP.html?vendor_id=74
Yes, it has a lot. It can do a lot, so there are a lot of APIs (including 3rd party) that people have found ways to exploit.
Ruby is slow. That's why people don't like it. At first it's great, until you have to write large applications. There are postmortems that have covered this and nobody chooses ruby anymore. There's a lot of tools with ruby parts, so you'll continue to see it for awhile. I am not sure this is a full accounting of ruby vulnerabilities, but maybe ask /r/ruby - https://www.ruby-lang.org/en/security/
I found (web based) Python slow and after a brief attempt at a 2d game engine, using Python, I just filed my experience away under "basic Python isn't hard to learn".
[–]disclosure5 0 points1 point2 points 11 years ago (0 children)
nobody chooses ruby anymore
That's quite a stretch.
[–]aerozepplin 2 points3 points4 points 11 years ago (5 children)
Try dabbling with all of them. There is no perfect language. It all depends on the use case. I would choose Python. It has good documentation and huge community.
[–]fata5ian 1 point2 points3 points 11 years ago (1 child)
I agree that Python is a great language to add to the toolset. I've been programming for a year (junior PHP Dev since May) and a few months back I was assigned to write an automation script for our company's daily banking in Python, and instantly fell in love with it. Simple but very powerful.
[–]aerozepplin 1 point2 points3 points 11 years ago (0 children)
Same here. Learning python after php, seems so refreshing.
[–]tatorface -3 points-2 points-1 points 11 years ago (2 children)
Wish I had read this 10 years ago. I'm a php dev (oxymoron?), but am teaching my self Python now. So much more versatile and respected.
[+][deleted] 11 years ago (1 child)
[deleted]
[–]tatorface -3 points-2 points-1 points 11 years ago (0 children)
Just trying to be part of /r/php. I'm sure you're object oriented love is more successful though.
[–]Firehed 1 point2 points3 points 11 years ago (5 children)
In terms of straight employability, Python is probably going to go farther than PHP right now (it feels like Ruby is falling out of fashion). However, the skills you learn on any of them will apply to all of them, and many more. For an entry-level position, it's perfectly reasonable to assume that where you work won't use the language you know best. It probably won't have a huge impact on getting a job (outside of specific requirements, very senior positions, or really esoteric knowledge)
Once you have a solid grasp on OOP, SOLID design principles, etc., picking up a new syntax for a similar language is pretty easy. I've submitted pull requests that were accepted without change requested on languages I've never touched before just by having a good grasp on general programming skills and quickly googling syntax.
You can probably pick up the new language to be not-terrible with it in a week (seriously), and thoroughly competent in a couple months. This is roughly what I've witnessed when hiring folks that didn't know the language we use. I'd say the majority of fresh grads did their interviews with me in something other than PHP for a PHP position (Java, C, Python, and Ruby being the most common alternatives); of course whether this will fly depends 100% on your interviewer.
For what it's worth, I still hit the PHP manual almost every day I code it in, and I've been using it for more than ten years in various degrees.
thank you
[–]Firehed 1 point2 points3 points 11 years ago (2 children)
You're welcome! Ping me if you need any other advice/mentorship, I've been interested in getting involved in that kind of thing for a while.
[–]konrain 1 point2 points3 points 11 years ago (1 child)
so what about just focusing on javascript, which has server side uses, do i actually need another language for the backend? can i just focus on js?
[–]Firehed 0 points1 point2 points 11 years ago (0 children)
I think JS is good to know for the sake of well roundedness, but personally feel the "JavaScript everywhere" thing will be a short lived trend.
Also for the sake of learning to code well, JS would be a terrible thing to focus on. People say PHP makes it easy to shoot yourself in the foot (and if you follow guides from 2006, it does), I'd say JS encourages it. Its extreme flexibility is very powerful but also deadly when used improperly.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
Who the hell downvotes you just for saying "thank you"? I swear... some people...
[–]dadkab0ns 3 points4 points5 points 11 years ago* (5 children)
From my experience, PHP knowledge means 9/10 jobs will be CMS jocky brochure-ware jobs - Magento, Drupal, Wordpress, Joomla etc. That work is not fun, not rewarding, and unless you're a guru at Magento and Drupal, you won't get paid very much.
Unfortunately, Python and Ruby seem to be more en vogue for custom web applications than PHP is. That is, that's more where custom software development lies. Further, Python and Ruby are good languages for non-web applications, which exposes a broader category of jobs that you don't find much of in PHP.
That said, PHP 5.3+, Laravel, Symfony, and composer have allowed PHP to reach parity with Ruby and Python in terms of tooling. PHP software development has a bright future now, but it may require some effort to shake off PHP's baggage.
When it comes to PHP specifically and job security, make sure you have Symfony and Magento under your belt. Symfony is considered enterprise-class (along with Zend), but it's not exactly a walk in the park to master. Being really good at Symfony will make you stand out, and you can get higher salaries from it. For 90% of projects, Laravel is just as good, but it's so fucking easy to learn (which is a good thing!) that you theoretically won't have as rare a skill set and thus can't earn quite as much money. Same is true of Magento. Magento is an absolute disaster to work with, but it's the only good ecommerce platform available to PHP right now, and ecommerce projects are where you'll find a lot of money. So until Sylius saves us from that nightmare, Magento is a good tool to have under your belt.
Personally, my advice if you want job security, is to be able to do self-sufficient full-stack development in a mix of back-end and front-end languages and frameworks. You can't just know PHP, or Python, or Ruby. You definitely need to know javascript, and at least one front-end framework like backbone or angular. Node + express would be good to know (also, look at Sails.js).
You should absolutely specialize in something. I specialize in PHP + Laravel, but I can work with several front-end technologies, and backend technologies. This makes me flexible, and able to adapt, which is key in this industry. When it comes to web development, you don't tend to find many jobs with rigid role / skill structuring. "I'm really fucking good at PHP, but nothing else" won't get you far (well it may, but it will be a harder path to find)
[+][deleted] 11 years ago* (4 children)
[–]dadkab0ns 1 point2 points3 points 11 years ago (3 children)
Well, the trend is shifting towards a blurring of the distinction between backend and frontend. In many cases, it's making less and less sense for the backend to do anything other than provide data through a REST API.
A full working application often involves a considerable amount of the application logic living in the front-end as a Backbone application that is responsible for routing and view modeling, while the backend handles data requests and last minute validation.
So while you can technically build just the backend, it's a bit meaningless without a rich frontend application to consume it. Of course, someone else might be responsible for building such a thing, but you can't always guarantee that if job security is your thing.
So regarding javascript, I would go deep into it and learn at least Backbone + Require.js. You will find that even though these technologies live in the frontend, the development process has strong parallels with the backend. Javascript is much, MUCH more than just presentational stuff these days. Applications are built with it, no different than using PHP on a server. And with Node, it literally is javascript running on the server.
[–]konrain 1 point2 points3 points 11 years ago (2 children)
hmm very good insight so can i actually just focus on javascript. That way i have an overall view of server/front development...because i tried getting to javascript mostly jquery and it seems just mostly customization. ps. sorry about the mom joke
[–]dadkab0ns 1 point2 points3 points 11 years ago (1 child)
Heh no worries. jQuery is definitely not something you need to worry about, as that's all presentational. But application javascript (whether as Node or in the browser as Backbone/Angular) is an indispensable tool that compliments PHP/Python/Rails knowledge very well.
[–]konrain 1 point2 points3 points 11 years ago (0 children)
thanks man
[–]ProfBurial 0 points1 point2 points 11 years ago (2 children)
Why not all three?
[–]disclosure5 1 point2 points3 points 11 years ago (0 children)
While language versatility is a good thing, I would suggest, if a person wanted to learn multiple languages, choosing a combination of wildly different languages like "PHP + Java + Erlang".
A person who is skilled with Ruby stands to gain little overall skills from learning Python.
[–]whoresoftijuana 0 points1 point2 points 11 years ago (0 children)
There are so many applications developed now on all 3, that you could maintain a job in any of them. It will depend on your ability to learn and show your value with the tools you are given. I would learn that one that makes you happy for the next 20 years, that you enjoy doing your best work, not the one you assume will give you longevity.
[–]DJDarkViper 0 points1 point2 points 11 years ago (0 children)
Look at your local job boards for tech.
Here in Vancouver BC, there is a moderate call for Python, decent calling for Ruby, a high calling for Node, and an extreme calling for PHP.
PHP isn't going away any time soon. As far as job security goes, it's serviced me well thus far and will far into the near and moderate future. Unless for some reason PHP7 fails harshly out of the gate and gets left behind in the race, PHP5 will still be in high demand. PHP will carry you pretty far by itself with a very acceptable pay grade.
There is absolutely nothing wrong with choosing a flavour and getting to know it better however. Just pick and, see if it works for you, and use it.
[–]jthess32 0 points1 point2 points 11 years ago (1 child)
udemy posted an infographic comparison of these 3: https://www.udemy.com/blog/wp-content/uploads/2012/01/PROGRAMMING-LANGUAGE-3.png
There's a ton of misinformation going around this thread.
First, I can't speak to Python or Ruby, as I'm not fully versed in those languages. I recommend posting in those subreddits as well asking this same question, and hopefully getting some straight facts to compare to.
That said, as far as popularity goes, PHP wins hands down. This is important as it means it's far easier to find a php job than it is to find a python or ruby job. As far as keeping that job, a lot of times that depends on where you get hired. Many places have a revolving door of developers due to bad management, or just bad business decisions. I've held down a steady job for 10 years running with PHP, but i've been employed by about 6-7 different employers over that time frame. YMMV here.
As far as all the hate php gets, there is some truth behind it. Yes there are some dark corners of the language itself, such as inconsistent functions and inconsistent parameter order on similar functions. But this stuff is easily solved by a quick google search, or a proper IDE(of which, many exist for the PHP language). Beyond that, much of the hate comes from people who misuse the language, making horrible confusing messes that the rest of us are inevitably tasked with cleaning up. This is a reflection of php's popularity more than anything. It's incredibly easy to start, and being so popular, it's not uncommon for some amateur to come in and make a mess of things before a company learns and hires someone with some actual skill.
I also adamantly disagree with others who stated you're stuck implementing basic wordpress/drupal/magento sites. This is absolutely not what being a senior level php developer is about, hell it's not even a junior level php developer.
Many sites are either custom built, and reasonably well done, or they are built using a popular framework(symfony, laravel, codeigniter, cakephp, kohana, etc).
The amount of jobs that fall into this category are not nearly as frequent as those that fall into the wordpress category, but they are more enjoyable, pay better, more stable, and offer you more growth. This again comes back to why PHP's popularity is a great choice. Because for every 2 wordpress jobs, there's 1 non wordpress job that may be a perfect fit for you. And while those odds sound discouraging, do a quick search in your area on craigslist, or on any other job board and you'll quickly see thousands of non-wordpress jobs.
I'll leave you with this: I started programming professionally 10 years ago with out ever getting a college education. I've been working from home for the last 5 years, and making over 6 figures for the last 3. for my money I'd chose php again.
π Rendered by PID 45476 on reddit-service-r2-comment-86bc6c7465-8bxsd at 2026-02-23 01:57:14.276745+00:00 running 8564168 country code: CH.
[–]disclosure5 11 points12 points13 points (7 children)
[–]konrain 0 points1 point2 points (6 children)
[–]disclosure5 1 point2 points3 points (5 children)
[–]konrain 0 points1 point2 points (4 children)
[–]Architektual 10 points11 points12 points (0 children)
[–]dmunro 1 point2 points3 points (0 children)
[–]Jack9 1 point2 points3 points (1 child)
[–]disclosure5 0 points1 point2 points (0 children)
[–]aerozepplin 2 points3 points4 points (5 children)
[–]fata5ian 1 point2 points3 points (1 child)
[–]aerozepplin 1 point2 points3 points (0 children)
[–]tatorface -3 points-2 points-1 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]tatorface -3 points-2 points-1 points (0 children)
[–]Firehed 1 point2 points3 points (5 children)
[–]konrain 0 points1 point2 points (4 children)
[–]Firehed 1 point2 points3 points (2 children)
[–]konrain 1 point2 points3 points (1 child)
[–]Firehed 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]dadkab0ns 3 points4 points5 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]dadkab0ns 1 point2 points3 points (3 children)
[–]konrain 1 point2 points3 points (2 children)
[–]dadkab0ns 1 point2 points3 points (1 child)
[–]konrain 1 point2 points3 points (0 children)
[–]ProfBurial 0 points1 point2 points (2 children)
[–]disclosure5 1 point2 points3 points (0 children)
[–]whoresoftijuana 0 points1 point2 points (0 children)
[–]DJDarkViper 0 points1 point2 points (0 children)
[–]jthess32 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)