Introduction To PHP

Joy Joel
3 min readJun 1, 2019

PHP started out as a small open source project that evolved as more and more people found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.
PHP is a recursive acronym for “PHP: Hypertext Preprocessor”.
PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.

Web Architecture

PHP makes use of MVC — Model View Controller. Almost every modern PHP framework comes with MVC architecture.
MVC (Model-View-Controller) was formulated by Trygve Reenskaug in 1979 for the SmallTalk language.
It separates the code into three layers. Model is the representation of all the data used, and the code required to make it persist. Model can also be used to query relationship between two or more table in the database. The Controller handles requests and updates the model. And lastly, View offers ways to extract and represent the data from the Model.
It was originally meant for the GUI interface in desktop applications.

Initially the View observes the changes in Model and updated itself automatically. But this approach has changed as it made its way to the web. This is because updating the view automatically is not feasible for the web.

The view is no longer using any observer pattern. It is usually passed the updated Model data by the Controller in almost all of the web frameworks.

Overview of PHP Platform

In the 21 years since its inception, PHP has become the world’s most popular server side scripting language. Known as a powerful, easy to learn language, PHP, according to one metrics site, is used by 82% of all the websites whose server-side programming language is known.
The different framework of PHP are:
* Symfony
* Laravel
* CakePHP
* CodeIgniter
* Phalcon
* Zend Framework, etc.

Origin of PHP in the open source community

Sometime in 1994 when Rasmus Lerdorf put together a bunch of Perl scripts to track down who was looking at his resume. Little by little, people started to get interested in the scripts, and they were later released as a package “Personal Home Page” tools (the first meaning of PHP). In view of the interest, he wrote a scripting engine and incorporated another tool to parse input from HTML forms: FI, Form Interpreter, thus creating what was called variously PHP/FI or PHP2. This was done around mid-1995.

Why we use PHP?

PHP runs on numerous platforms, including Windows, Linux, Unix, Mac OS X, and so on.
PHP is compatible with almost any modern server, such as APache, IIS, and more.
PHP supports a wide range of databases.
PHP is free.
Easy to learn and runs effectively on the server side.

Some PHP strengths

  • Generating dynamic page content
  • Creating, opening, reading, writing, deleting and closing files on the server.
  • Collecting form data
  • Access cookies variables and set cookies.
  • Controlling user-access
  • Encrypting data

Some of PHP’s main competitors are PERL, Microsoft ASP.NET, JavaServer Page, Ruby on Rails, Django (Python) etc.

Installing as a module for Apache Web Server

Apache uses httpd.conf file for global settings, and the .htaccess file for per-directory access settings. Older versions of Apache split up httpd.conf into three files (access.conf, httpd.conf, and srm.conf), and some users still prefer this arrangement.

Apache server has a very powerful, but slightly complex, configuration system of its own.
But with the help of Xampp, Lampp, Apache server can be started automatically without writing codes for it. Except you desire to personalize it.

Disclaimer: This is a beginner’s guide to PHP written by a PHP Newbie

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Joy Joel
Joy Joel

Written by Joy Joel

Abba’s Daughter| DevOps Engineer|Technical Writer

No responses yet

Write a response