This is a very popular question that comes up, especially when you are first starting to choose your path in development. I believe you really can’t go wrong with which route you choose but it does help to know some basic guidelines when deciding whether to pursue your efforts in Microsoft based technologies or the open source community.
First, be very wary about where you get your information; each side tends to be extremely biased, and in most cases fairly ignorant of their competition. There are however good sources that have expert experience in both ASP.NET and various Microsoft based technology as well as PHP, Java, Python and other more open source style technologies.
The next thing you want to look at is the type of projects you will be most often working on. Where there are exceptions to this, generally .NET code will be chosen when working in the realm of medium to large scale projects. PHP and other open source is generally chosen for the two extremes of the spectrum; predominately used for small companies, websites that require some but fairly little code-interaction and database operation or the complete opposite: extremely large institutions/organizations where there are very exacting requirements and incorporate several programming languages for specific use. In the latter example, these are companies who hire one or several programmers in languages from all across the board and are generally high paying but hard to obtain positions.
.NET Programmer by Day, Open Source Junkie by Night
Personally, as a career I work in a 100% Microsoft based company. All .NET all the time. The closest thing we get to open source is XML. However, this is a great thing for the structure of the company, the types of projects we work on, and the rapid/agile development we do. Code changes quickly, is tested with fairly limited resources, and is done in an extremely friendly development environment (Visual Studio). SQL administration is a dream in SQL Server Management Studio and incorporates nicely into Visual Studio for small projects.
At night, after hours, the old hacker mentality tends to creep up and encourages me to play a little in PHP on a Linux box that’s taken a cramped residence on my small desk at home. This is just how I like it, somewhat slumming it if you will. This is not to say that PHP and open source is not just as professional as .NET, as I mentioned before, but it is somewhat cultural that PHP developers tend to be more rogue and ad hoc in their development education and application.
Make a Choice and Stick with it… then Switch a Couple Times
So there you have it, a brief but somewhat non-technical comparison between .NET and PHP. Eventually I will probably add to this a bit as time goes by to include additional vantage points, pro’s and con’s, and technical spec’s.
If you would like to view more technical information you can find copious amounts of information by searching “ASP.NET vs. PHP”.
One last piece of advice, whatever you decide go ahead and do it for a while until you can development in it comfortably. If you’re constantly looking up information on google on how to develop basic code you’re not quite there yet. You should be able to write line-style code in whichever language you use. So drop the WYSIWIG’s and write code by hand, I guarantee you will become a better developer.