Dotnet and PHP are compared in this document. Dotnet was introduced in 1985 while PHP came 10 years later in 1995. The main difference is that PHP is a programming language that can be used for web development, while Dotnet is an entire framework that allows different languages like C# and Visual Basic to be used. PHP has an easier syntax similar to other languages and is open source and free to use, while Dotnet has a syntax like C/C++ but is proprietary to Microsoft and has associated costs. PHP is better for lightweight coding and testing while Dotnet applications may have a longer development time.