Learn web development, system admin, devops, digital marketing, project management and more

PHP topic banner

PHP is commonly described as a general-purpose scripting language.  It is used by web developers to create dynamic web pages. When a visitor accesses a page the processing is done server-side. This is opposed to client-side languages like JavaScript that process within the browser. This allows data to be accessed from a database or a connection to other backend operations located on the server.

The language was created by Rasmus Lerdorf in 1994 and has grown to become one of the most popular scripting languages on the web.  The original meaning of PHP was “Personal Home Page” but has been changed to mean “PHP Hypertext Preprocessor”.


PHP Video Tutorials


So what types of things can PHP do?

As mentioned above, PHP allows you to generate dynamic content to display to your website visitors.  This may include text that is stored in a database or possibly the answer to a mathematical calculation.

Its power lies in its ability to organise data and provide functionality that static web pages cannot achieve. Operations are performed in the background to allow a website to run as a complete application. This has been further enhanced with the wide adoption of PHP frameworks that give structure and standards to the PHP code that you write.

Typical PHP operations include the following:

  • Creating, reading, updating or deleting files on the server or data into a database
  • Creating browser cookies and storing or receiving information inside them
  • Encrypting sensitive data such as passwords
  • Creating private membership areas and managing user permissions 
  • Receiving and processing database from HTML forms
  • Making connections to remote servers such as through a REST API or database
  • Generating all types of content beyond standard HTML. This might include PDF documents, images, XML, JSON, spreadsheets and more!
  • The applications are vast as you will discover in your travels learning PHP

Why would you want to use PHP?

If you are looking at getting into the game of building websites with power and flexibility PHP is definitely worth considering.

PHP is a well supported and extremely popular scripting language.  A wide range of applications has been built using PHP. WordPress, Facebook, Wikipedia to name a few.

Most server platforms are able to run PHP such as Linux, Windows and Mac. Many databases are supported, MySQL being one of the most popular.

PHP is relatively an easy language to learn and to top it all off, it's free!

 

Articles

The History of PHP

The History of PHP

After scouting the web, Wikipedia seems to have the most thorough and up to date rundown of the history of PHP language. It talks about Rasmus Lerdorf as the original inspiration and conception of PHP and Zeev Suraski and Andi Gutmans' later contribution in PHP 3 in 1997 rewriting the PHP parser. 

Unlike the history given on the official php.net site, the Wikipedia version goes on to talk about versions beyond PHP 5.  There's a nice release history table there to review release dates and when each version was supported up until.


Resources

Official PHP Website php.net

Official PHP Website php.net

php.net is the official place for PHP documentation.  You can access the latest information about PHP versions and has a complete reference guide.

W3Schools PHP Tutorials

W3Schools PHP Tutorials

The W3Schools PHP section is a great resource for learning PHP. They have over 50+ pages of PHP tutorials logically ordered into main groups...

  • PHP Tutorial
  • PHP Forms
  • PHP Advanced
  • PHP OOP
  • MySQL Database
  • PHP XML
  • PHP -AJAX
  • PHP Examples
  • PHP Reference

PHP Tutorial for Beginners: Learn in 7 Days

PHP Tutorial for Beginners: Learn in 7 Days

PHP is the most popular scripting language on the web. Without PHP Facebook, Yahoo, Google wouldn't have exist. The course is geared to make you a PHP pro. Once you digest all basics, the course will help you create your very own Opinion Poll application.


PHP Frameworks

CodeIgniter PHP Framework

CodeIgniter PHP Framework

Codeigniter is a lightweight yet powerful PHP framework intended for web developers that need a comprehensive list of features without too much overhead.

Originally authored by EllisLab in 2006, Codeigniter is now managed and developed by the British Columbia Institute of Technology.  In 2021 Codeigniter 4 was officially released seeing a complete rework of the framework to make use of enhanced technologies used in PHP7+.

While Codeigniter has seen somewhat of a rise and fall giving way to PHP frameworks like Laravel it is still a framework worth considering for your PHP journey. Its benefits being great performance, easy to learn, very little configuration, MVC code structure and little reliance on third-party libraries or complex conventions that slow the development process.

The documentation is fairly straightforward to follow.  If more practical examples are required you can generally find them because of its strong online community.

If you are new to PHP frameworks, definitely have a look at Codeigniter as your first PHP framework to adopt.

Laravel PHP Framework

Laravel PHP Framework

Laravel is arguably the most popular PHP framework out there today.  It's seen immense popularity in recent years and is the go-to framework for a lot of PHP developers.

An extract from the Laravel website...

"Laravel is a web application framework with expressive, elegant syntax. A web framework provides a structure and starting point for creating your application, allowing you to focus on creating something amazing while we sweat the details.

Laravel strives to provide an amazing developer experience, while providing powerful features such as thorough dependency injection, an expressive database abstraction layer, queues and scheduled jobs, unit and integration testing, and more."

Symfony PHP Framework

Symfony PHP Framework

The Symfony PHP Framework is well respected among the PHP community and one of the heavyweights in terms of features.

Symfony may be a little more complex in its approach but provides all the tools required of a framework that may be of benefit in the future.  Things may seem ok when you're application is of smaller size but when it grows it's good to know that this framework has been designed with scalability in mind.

Since so many applications are built on Symfony, it is well worth exploring.

Check out some reviews of Symphony on Trustradius.


Tools

Grocery CRUD

Grocery CRUD

Grocery CRUD is an extremely useful open-source library that allows you to set up CRUD applications very quickly.  It's written to work with the CodeIgniter framework.

Perfect for setting up a quick admin area to manage your public application. For simple operation, only a few lines of code is needed Create an instance of Grocery CRUD. Add the table name you have created and a subject and presto, you have a fully-fledged CRUD interface for managing your database.