PHP 8 - Introduction

Last modified: April 02, 2022

What is PHP?

  • PHP is a server side scripting language (executed on the server)
  • It is very powerful to make dynamic and interactive Website.
  • Free to download and use
  • It is widely used e.g. Facebook (most popular social site), Wordpress (most popular CMS)
  • It is easy to learn
  • Can work with multiple Databases even though MySQL is native
  • Most Web hosting supports PHP, and even cost effective price compare to other languages (e.g. .NET)


You need to have basic understanding of the following:

  • HTML
  • CSS
  • JavaScript

The Server execute PHP script/file and output HTML which is display to client browser. PHP tags themselves are not case-sensitive but it is recommened. Each line is end with semi-colon(;). The following is an example of a simple PHP code

<?php … ?>
Hello World.

The following code show a basic example of PHP code that output the string Hello world to the browser.

<?php echo "Hello world"; ?>
In the tutorial, we are going to build products listing page