Categories
Program

What is difference between PHP and ASP?

Before knowing difference between PHP and ASP, we must know the expansion of PHP and ASP,

PHP – Hypertext Pre Processor

ASP – Active Server Page

 

PHP

[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:

[syntax type=”html|php|js|css”]

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

[/syntax]

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.

 

ASP

Asp is also an web development language developed by Microsoft. ASP is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript. One of the advantage of ASP framework is its interoperability, you can easily use Visual Basic or C# code directly into ASP code.

Sample ASP Code:

[syntax type=”html|php|js|css”]

<!DOCTYPE html>
<html>
<body>
<%
response.write("My first ASP script!")
%>
</body>
</html>

[/syntax]

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]

 

1 reply on “What is difference between PHP and ASP?”

Leave a Reply

Your email address will not be published. Required fields are marked *