It's hard to ask something like that because most people ussualy pick one language and stick to it for a majority of their projects, not using the other enough to make a bias opinion. I personally have coded in PHP daily for about 10 years, and ASP.net daily for about 5 (but have over 12 years experience in VB.net).
That being sad, ASP.net is the better option in my opinion due to the fact that it offers you so much stuff from one platform, where in PHP your extremely limited. To list just a few:
- Knowing either VB.net or C# allows you to not only developed advanced websites, extremely fast, but also extremely robust desktop applications too, all from the same language. This is especially handy if they go side by side (Example, you web site handles all of the front end work, yet you have a back end bot that uses all the data. You can easily develop one DAL/BLL DLL that will work in both instances... Even more so you have several sites all working with the same database and classes, you can compile 1 DLL and use for all. I commonly do this when I have a front end site, such as a social network, and a separate administration site.
- Knowing VB.net or C# also allows you to make extremely nice games, which can even be compiled into platforms such as WII using mono
- Knowing C# or VB.net also allows you to develop full apple store compliant iPhone apps using MONO
- Using C# or VB.net you can make extremely interactive web based applications such as Flash offers by using the Microsoft alternative, Silverlight... Free at that (My license to Adobe Creative was almost 1.6k).
- ASP.net offers something PHP can't even come close to offering right now, and thats the ability to use other languages with it. Do you have a huge site that you developed in PHP and want to use a ASP.net control or plugin you found? Sucks to be you, you have to port it all over to PHP. In .net however, you can easily compile PHP right to a DLL that works with every other .net language... But wait, you can also compile Ruby, Python, and as time goes on probably almost any other language into a DLL you can access right through your coding! EVEN JAVASCRIPT! (i'm sure you can see where compiling someones JS, as apposed to porting it all could be very useful)
Other reasons I suggest ASP.net would include, but are surely not limited to:
- PHP is open source... Most people find that as a plus, I sure the hell do not... The reason being PHP is funded by grants, not people who are paid to make a great product and get bonuses when the product does good. Since 2003, Microsoft has release a new version of their software pretty much every 2.5 years, and each time has added dramatic features. To name a few: LINQ, MVC, ASP.net Ajax, Silverlight, azure. PHP is currently about at the spot that ASP.net was back in ASP.net 2005 (.net 2.0).
- Compiling... I own a business of developing software for companies. I sell them my PHP coding, they will take that and have other, cheaper, developers make small mods to it. Sure you can comress PHP.net, but there is no easy, out of the box, way to compile. ASP.net however compiles all to a DLL. You distribute this DLL, and not your source, so all updates they have to do through you. It's a obvious if your selling your coding to clients which is the ideal choice.
- Ease of coding... In vb.net you simply add the following function to your class to have actions take place... which u can easily auto generate by clicking on the button in a visual environment! PHP on the other hand, u have to build the whole <form> with inputs and detect specific types of posts... Development time is dramatically less for me in ASP.net!
Private Sub btnClick_Clicked() handles btnclick.Click()
'dowork
end sub
-Cache... How easy is Cache in ASP.net? Simply put in the page header Cache=20 to cache the page 20 minutes... What does that do? Makes your page only load once every 20 minutes and in turn saves you tons of resources and makes your coding 10000 times faster! Now PHP offers this too, but no where near as simple as ASP.net
- Learning! PHP has tons of places to learn but nothing that comes close to ASP.net, for free, that I have found to date. Head on over to
Learn : The Official Microsoft ASP.NET Site and you will find dozens upon dozens of free, step by step videos teaching for EVERYTHING from downloading Visual Web Developer, to making a full website. They even have tons of starter kits for many different things you would want to develop, all for *FREE*
- Did I mention *FREE*? Despite popular believe, Microsoft offers almost anything you would need to get started all for *FREE*! Visual Web Developer has everything you would ever need in a IDE and is 100% free. SQL Server express edition is free for databases 5 gigs and below, and if your DB is bigger than that, you better be able to spend the 15 bucks a month it is for a web license to the full version. But wait, do you have less than 10 employees in your company? Microsoft will over you licenses to everything you would ever need (few will need more than the free stuff anyways) for up to 3 years, 100% free of charge to help you grow! This includes professional versions of VS, unlimited SQL databases, Server 2008, Expression studio, and more! Sign up here:
WebsiteSpark - Home
---------------------
As my list can go on for ever, keep in mind I develop both daily so my opinion here is extremely unbiased! But at the same time, it is an opinion.