PHP Tutorial Licence

This workshop can be copied for private usage. A commercial usage requires the approval of the author.

If you have any remarks or questions feel free to send an email to webmaster(at)admin-wissen.de.


The Scriptinglanguage PHP - What is PHP?

PHP is a scripting lanuange. This means PHP Script get compiled on runtime. Copared to C programms PHP Script get not comipled into machine code, they are interpreted by a PHP interpreter. The main use case of PHP are webapplications. In general other use cases are possible.


Starting with php is quite simple. On a few days you can start to implement your first application. This is possible, because many things are done automatically in PHP. For example, data types of variables are determined automatically. This is usefull, but you should keep it in mind.


Especially when you start object oriented programming it is good to understand the internal datatypes.

The History of PHP

In 1995 Rasmus Lerforf startet to write PHP/FI. At that time PHP/FI was a collection of perl script. Rasmus Lerdorf wanted to measure the amount of visitors of his website.


He gave these Script the name "Personal Homepage Tools".


Over the time there where more and more requirements to this tools set. Because of this, a implementation written in C was startet. Rasmus Lerdorf decided to open source PHP/FI and this was the start of php.


This is the anouncement of Rasmus Lerdorf on the internet:

These tools are a set of small tight cgi binaries written in C.

They perform a number of functions including:

. Logging accesses to your pages in your own private log files

. Real-time viewing of log information

. Providing a nice interface to this log information

. Displaying last access information right on your pages

. Full daily and total access counters

. Banning access to users based on their domain

. Password protecting pages based on users' domains

. Tracking accesses ** based on users' e-mail addresses **

. Tracking referring URL's - HTTP_REFERER support

. Performing server-side includes without needing serversupport for it

. Ability to not log accesses from certain domains (ie. yourown)

. Easily create and display forms

. Ability to use form information in following documents


Here is what you don't need to use these tools:


. You do not need root access - install in your ~/public_htmldir

. You do not need server-side includes enabled in your server

. You do not need access to Perl or Tcl or any other scriptinterpreter

. You do not need access to the httpd log files

The only requirement for these tools to work is that you have

the ability to execute your own cgi programs. Ask your system

administrator if you are not sure what this means.

The tools also allow you to implement a guestbook or any other

form that needs to write information and display it to users

later in about 2 minutes.


The tools are in the public domain distributed under the GNU

Public License. Yes, that means they are free!


For a complete demonstration of these tools, point your browser

at: www.io.org/~rasmus


By making PHP OpenSource it was possible to fix bugs and extend php and it was a boost for the groth of php. 


PHP Release History

In the year 1997 PHP/FI 2.0 has been released.

At that time PHP/FI 2.0 has been used on 50000 Domains.


In the year 1998 the next major version of php was released. This version, PHP 3, was also very popular and php was used more and more.

Andi Gutmans, Zeev Suraki and Rasmus Lerdorf developed PHP 3 as the next generation after PHP/FI 2.0.The possibility to extends PHP with modules was a huge motivation for developers to extend the php core.

In May 2000 the Version 4 of PHP was released. The Core of PHP (Zend) was re-implemented. The Name Zend is composed of the names of the developers Zeev and Andi. Programming in PHP4 was mainly procedural but first parts of object oriented programming were supported in PHP4.

With PHP5 there was a big improvement in object ortiented programming. Concepts like "abstract classes", "interfaces" and visibility properties "private", "public" and "protected" where introduced. Version wise there were many minor Releases of PHP5 but PHP7 is comming up in the next months.