• HTML embedded, server side, scripting language
  • Similar syntax to C, Java, Perl
  • Can be ran from the command line!
  • Interpreted language
  • Does not need to be compiled
  • Requires PHP to be installed as a server service
  • Files end with .php to let the server know that its dealing with a PHP file, and therefore needs interpreting
  • Returns HTML


  • 1994 Rasmus Lerdof created Personal Home Page Tools, set of Perl scripts
  • 1995 v1 PHP/FI (Personal Home Page / Forms Interpreter). Rewrite as a set of CGI binaries developed in C
  • 1997 v2 PHP/FI 2
  • 1998 v3 PHP: Hypertext Preprocessor. Recursive acronym. Parser rewrite
  • 2000 v4 New Company Zend
  • 2004 v5 Includes OOP

Working Model


  1. Browser Client requests page from ISP
  2. ISP resolves DNS and sends request to target web server
  3. Target web server, running Apache, finds target page
    • Since target page has .php extension, it tells the server that it needs to process the page as a PHP file
  4. PHP interpreter processes the PHP tags and asks for any requested data from MySQL database
  5. MySQL database returns any requested data to the PHP interpreter
  6. PHP returns the interpreted data as HTML to Apache
  7. Apache returns the interpreted HTML
  8. Browser Client receives receives requested page