Code in PHP

Learn the basics of PHP through coding examples.

PHP

In 1994, Rasmus Lerdorf, a Danish-Canadian programmer, wrote several CGI programs in C. Common Gate Interface (CGI) is an interface specification that will let web servers execute programs that can generate dynamic web content. Lerdorf created this for his private web page and extended and added functionality to handle web forms and database communication. He named the project Personal Home Page/Forms Interpreter, abbreviated to PHP/FI.

Lerdorf has later admitted that he never intended to create a new programming language, but that the project got a life of its own. As a result, a development team was formed, and in 1997 PHP/FI 2 was released.

The language is primarily used on web servers to create dynamic web content.

Here are some quick facts on it:

  • Name: PHP
  • Designed by: Rasmus Lerdorf
  • First public release: 1995
  • Paradigm: Imperative, functional, object-oriented, procedural
  • Typing: Dynamic
  • Most frequently used file extension(s): .php

...