Before knowing difference between PHP and ASP, we must know the expansion of PHP and ASP,
PHP – Hypertext Pre Processor
ASP – Active Server Page
[dropcap background=”yes” color=”#333333″] I[/dropcap]ts is an web development language, it is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
Its available for free of cost (Open Source), Scalable and Extendable.
You can write PHP code in normal Text editor, there is no special IDE for development of PHP. Most commonly PHP is included in HTML code just like a scripts, so sometimes its also called as scripting language.
PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.
Sample PHP Code:
<?php echo '<p>Hello World</p>'; ?>
The code inside <? and ?> is treated as PHP code. Whenever the .PHP file is viewed by browser (i.e www.aravin.co.in/page.PHP). The PHP compiler which is running on the Web Server will parse this PHP code into corresponding HTML code.
Sample ASP Code:
response.write("My first ASP script!")
Same as PHP, here the .NET compiler will parse the following code into HTML code. Internet Information Server (IIS) web server is used to run ASP files or websites.
[blockquote source=”Tips”]Now a day ASP is knows as Classic ASP, It is replaced by advanced ASP .NET (aspx) [/blockquote]