Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is PHP PHP (officially "PHP: Hypertext Preprocessor") is a server-side HTML-embedded scripting language –means that code does not need to be compiled.

Similar presentations


Presentation on theme: "What is PHP PHP (officially "PHP: Hypertext Preprocessor") is a server-side HTML-embedded scripting language –means that code does not need to be compiled."— Presentation transcript:

1 What is PHP PHP (officially "PHP: Hypertext Preprocessor") is a server-side HTML-embedded scripting language –means that code does not need to be compiled before it gets used it gets processed on the fly as necessary –has the capability of executing the script on the server and serving the output as a HTML File –it is responsible for manipulating the data which is filled in the entire web forms, any where in the net. – advantage of interacting with the databases and to perform all types of server manipulations directly

2 History of PHP

3 PHP/FI (Personal Home Page/Forms Interpreter) is the first release of PHP written by Rasmus Lerdorf in 1995. –It was inititally a simple set of Perl scripts for tracking accesses to his online resume. PHP/FI evolved into PHP 1.0 and 2.0, advanced piece of software that understood complex scripts. –Php 2.0 was released in 1997 and it had around 50,000 domains in which it was installed in.

4 History (cont’n) PHP 3.0 was created by Andi Gutmans and Zeev Suraski in 1997 as a complete rewrite of the original PHP/FI 2.0. –was the first version that closely resembles PHP as we know it today. PHP 3.0 had strong extensibility features, with solid infrastruscture for lots of databases and API’s. –It attracted dozens of developers to join in and submit new existing modules. –by the end of 1998 it was installed on hundreds of thousands of websites.

5 History (cont) PHP 4.0 officially released may 2000. -based on the ZEND engine, a rewrite of PHP’s core to achieve improved performance of complex applications, and improve modularity of PHP’s code base - May 2003, almost 13 million domains were using PHP according to Netcraft survey and PHP.nets figures

6 Features PHP has support for most of the web servers today. –Apache, Microsoft IIS, PWS, Netscape and iPlanet servers, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, and many others. PHP has support for a wide range of databases –Adabas D, Ingres, Oracle (OCI7 and OCI8), dBase, InterBase, Ovrimos, Empress, FrontBase, FilePro (read-only), mSQL,Solid, Hyperwave, Direct MS-SQL, Sybase, IBM DB2, MySQL, Velocis, Informix, ODBC, Unix dbm

7 Features You can very rapidly develop web applications in PHP PHP applications are very stable and do not depend on the browser technologies

8 Features Dynamically typed language, so it makes it extremely easy and fast to develop in. PHP has Zend optimizer which speeds up the performance PHP has a very large user base and developer base  Open Source - PHP is open source, you can modify the actual language to your needs.

9 Disadvantages Primitive Error Handling It is a Dynamically typed language, so it makes it extremely easy to hang yourself if you don't know what you are doing Some of the function names do not have a consistent naming scheme. Object orientation is really syntatic sugar. Objects are only slightly more than assoicative arrays with functions bound to them. Lacks Database Abstraction

10 Sample Programs

11 Example1 A basic PHP script:

12 Example 2 text.html Who is your favorite author? text.php <?php echo "Your favorite author is: $Author"; ?>

13 Example 3 Number.html I would like to know: the factorial of if the following number is prime the number following

14 Example 3 con’t number.php <?php function fact($Value){ if($Value<=1) return 1; else return $Value*fact($Value-1); } function isPrime($Value) { $Count = 2; do{ $Remainder = $Value%$Count; $Count++; }while ($Remainder !=0 AND $Count<$Value); if(($Count<$Value) OR ($Value == 0)){ echo "$Value is not prime"; } else{ echo "$Value is prime"; } switch($opt1){ case "fact": echo "$Value has a factorial of". fact($Value); break; case "prime": echo isPrime($Value); break; case "next": echo "The next number after $Value is ". ($Value+1); break; } ?>

15

16 Links php manual: http://www.php.net/docs.php compiler url http://www.php.net/downloads.phphttp://www.php.net/downloads.php http://msdn.microsoft.com/library/default. asp?url=/library/en- us/dnaspp/html/phpvsaspnet.asp (asp vs Php)http://msdn.microsoft.com/library/default. asp?url=/library/en- us/dnaspp/html/phpvsaspnet.asp http://www.zend.com/


Download ppt "What is PHP PHP (officially "PHP: Hypertext Preprocessor") is a server-side HTML-embedded scripting language –means that code does not need to be compiled."

Similar presentations


Ads by Google