We’ve all encountered it before, and we’ve all asked this question in one way or another. I see it appearing in Yahoo Answers every now and then, and I see similar platform comparison in blogs I read. Its clear this issue is still quite relevant today and will continue to be tomorrow.

So which is better? PHP or .NET?

I did some searching and came across plenty of articles discussing this issue, and here are some of the better ones I read:

So instead of debating the finer points about whether it better that ASP.NET is compiled and PHP is not, I want to take a step back and look at this issue from another angle. I’m really talking about that decision process every developer will go (or have gone) through sometime in their career – the decision that puts food on the table.

Where’s the cheese?
There’s no point debating over whether PHP or .NET is better if there are no jobs available. Thankfully, from what the few job sites I searched on, both PHP and .NET have opportunities available. My search at monster.com gave me 2560 jobs for ‘php’, more than 5000 jobs for ‘.net’ and more than 5000 jobs for ‘java’.

I know this is by no means scientific, because other factors are not taken into count – like where you’re located, or the number of jobseekers competing with you. In any case, your own search for job openings might help you decide whether PHP or .NET is better as a career choice.

Feel comfortable
When I started in my career, I was using Classic ASP for about 3 years, after that I switched to another company where I ended up using PHP (version 3, at that time). I tell you, the moment I was on PHP, I never looked back at ASP again. It just felt more comfortable and more intuitive for me. I felt that I was more productive in using PHP than I ever was with Classic ASP. I liked the PHP syntax, I liked the whole Linux environment and working with MySQL was a breeze.

Whether its PHP or .NET, one of these technologies should feel more ‘comfortable’ with you than the other. It’s like choosing between Burger King and MacDonalds – you will definately formulate your own opinion about which you find more comfortable. It could be that you like the fact that PHP is so community driven, you can interact with that community, openly share ideas and help, and get your hands on open-source apps. Or, maybe you like .NET because you like that structured NET framework, and you get a big kick out of using Visual Studios. Whatever. Just get comfortable.

Jack of all trades…
Whatever you decide, I dare say, don’t be a jack of all trades. Specialize. If you want to have any market value, you need to be good at what you do. It’s a full-time job just to be clued in to either domains. You will only be good at whatever do you if you enjoy the work. Again, my point – get comfortable.

In my case, PHP has put food on my table, and has done so for many many years now, and I know, no matter how crappy PHP gets, or how great .NET becomes, I would still keep using PHP.

What about you?