PHP: Hypertext Preprocessor Introduction

2,443 views
2,231 views

Published on

Simple introduction to PHP for someone who does not know what PHP is and how was born.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,443
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

PHP: Hypertext Preprocessor Introduction

  1. 1. PHP: Hypertext Preprocessor Oto Brglez | September 2008 [email_address] http://heapsoft.com http://opalab.com
  2. 2. What is PHP? <ul><li>PHP is a computer scripting language . </li></ul><ul><li>Originally designed for producing dynamic web pages . </li></ul><ul><li>PHP is program that generally runs on a web server , taking PHP code as its input and creating web pages as output. </li></ul><ul><li>PHP is installed on more than 20 million websites and 1 million web servers . </li></ul><ul><li>PHP can be used free of charge , because it’s open source project. </li></ul><ul><li>PHP has syntax similar to C/C++ </li></ul>
  3. 3. History of PHP <ul><li>Began in 1994 as a set of Common Gateway Interface(CGI) binaries written in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf . </li></ul><ul><li>Lerdorf released PHP publicly on June 8, 1995 to accelerate bug location and improve the code. (PHP 2) </li></ul><ul><li>Zeev Suraski and Andi Gutmans , two Israeli developers, rewrote the parser in 1997 and formed the base of PHP 3 , changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. </li></ul><ul><li>Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999 . </li></ul><ul><li>On May 22, 2000 , PHP 4 , powered by the Zend Engine 1.0, was released . </li></ul><ul><li>On July 13, 2004 , PHP 5 was released, powered by the new Zend Engine II. </li></ul><ul><li>As of August, 2008 this branch is up to version 4.4.9. </li></ul><ul><li>PHP 4 is no longer under development nor will </li></ul><ul><li>any security updates be released. </li></ul><ul><li>In 2008 , PHP 5 became the only stable </li></ul><ul><li>version under development. </li></ul><ul><li>PHP 6 is under development alongside PHP 5. </li></ul>
  4. 4. What do i need to “do” PHP? <ul><li>Operating System (Windows, Linux, OS/X, Solaris…) </li></ul><ul><li>Web Server (Apache, IIS…) </li></ul><ul><li>PHP (Source, Binary od Package) </li></ul><ul><li>Database (MySQL, MSSQL, Oracle,…) </li></ul>L = Linux A = Apache M = MySQL P = PHP
  5. 5. How PHP works? <ul><li>User sends HTTP request to Web Server from his Web Browser. </li></ul><ul><li>Web server validates request and parses key parameters. This parameters are then sent to PHP program installed on system. </li></ul><ul><li>PHP parses .php script and outputs HTML document. </li></ul><ul><li>HTML document produced by PHP is then served by the Web Server as response to users HTTP request. </li></ul>
  6. 6. What is PHP script? <ul><li>Script is text document . </li></ul><ul><li>Script usualy has .php extension . </li></ul><ul><li>Script is located on web server . </li></ul><ul><li>Scripts can be made from PHP code and HTML code. </li></ul>
  7. 7. How does PHP script look like? <ul><li><?php </li></ul><ul><li>$a = 10 ; // Komentar ;) </li></ul><ul><li>$a = “ Test ”; </li></ul><ul><li>for ( $i =0; $i <=10; $i ++) { </li></ul><ul><li>print (“ Zdravo svet! <br/> ”); </li></ul><ul><li>} </li></ul><ul><li>$imena [] = “ Oto Brglez ”; </li></ul><ul><li>?> </li></ul>
  8. 8. Why is PHP sow successful? <ul><li>PHP is realy realy FAST ! </li></ul><ul><li>It has simple syntax </li></ul><ul><li>It’s weak typed </li></ul><ul><li>No compiling </li></ul><ul><li>Open source code </li></ul><ul><li>Long history </li></ul><ul><li>Modularit y of PHP core </li></ul><ul><li>Many developers </li></ul><ul><li>Realy good documentation project (docs.php.net) </li></ul>
  9. 9. How to start with PHP? <ul><li>Go to www.php.net </li></ul><ul><li>Read geting started </li></ul><ul><li>Do a simple tutorial </li></ul><ul><li>Visit http://docs.php.net and explore the documentation provided by PHP comunity </li></ul><ul><li>Buy a book or read online tutorials </li></ul>
  10. 10. Strange PHP facts <ul><li>You can write desktop applications in PHP using PHP-GTK lib. </li></ul><ul><li>You can run PHP on Symbyan OS on Nokia (S60) mobile phones. </li></ul><ul><li>You can run PHP on Pocket PC ( Pocket HPH project ). </li></ul><ul><li>NanoWeb is web server written in PHP. </li></ul><ul><li>WinBinder allows PHP programmers to easily build native Windows applications. </li></ul><ul><li>Bambalam PHP EXE Compiler/Embedder is a free command line tool to convert PHP applications to standalone Windows .exe applications. </li></ul>
  11. 11. My projects… Oto Brglez | September 2008

×