Getting started with PHP Development - Paper Pencil Write-Up Google+Find us on Google+

Getting started with PHP Development

PHP Development is most used technology when it comes to developing websites or web apps.

Website development consist of two main component

  1. Frontend
  2. Backend

Frontend as it sound is all about the appearance and interactivity of web pages and the backend is about processing data, logics.

Let’s consider an example of a contact form:-
How form will look is frontend and how the data of form will handled after submission is work of backend technology.

How to get started with PHP

As PHP is server side scripting language it needs server unlike HTML, CSS, JavaScript and jQuery which are client side language.
You can either install Apache or Nginx either one can be used to run PHP.

There are some pre-built  solution to run a web server on your computer or laptop, here are those:-

  1. XAMPP
  2. LAMP
  3. WAMP


  1. 1. XAMPP – AMPP on XAMPP Stands for Apache, MariaDB, PHP, Perl and X stands for any platform or Cross platform (OS like Windows, linux or OS X)
  2. LAMP – LAMP stands for Linux, Apache, MySQL, and PHP. So it is only built for Linux.
  3. WAMP – WAMP stands for Windows, Apache, MySQL, PHP.  So it is only for Windows.

Note – XAMPP runs MySQL so don’t get confused with the MariaDB.

Installing XAMPP (Web Server/Localhost) on OS X (Maxbook Air 13.3) or any other platofrm

As I have Macbook Air, I will be guiding you to install XAMPP on Macbook Air but you can use same instructions with Linux as well as Windows.

First go to and download XAMPP based on your OS and hardware architecture. I am going to download  following version “7.0.26 / PHP 7.0.26” which you can directly download by clicking here.

Once you XAMPP is installed just click on it and installer wizard will start. Follow the steps as they are very easy.

That is really simple isn’t it. Let get start with Hello World application.

Run Hello World in PHP (XAMPP)

Locate “htdocs” directory in your system. It most likely will in following address /Applications/XAMPP/xamppfiles/htdocs/ if you are OS X user if now you can use search on window or linux to find.

Once you located the folder you need to create a file with .php extension. .php extension is important because it tells server to execute this file as PHP so if you have .html extension then all the code you write on php will simply print instead of executing through server. Don’t worry you can use all html elements inside .php file.

I have created hello.php inside htdocs folder and now here is code to print “Hello World”

<?php echo "Hello World";?>

Code explanation:-

  • “<?php” simply tells server that it’s start php PHP code for execution.
  • “?>” is to instruct server that php code is done so stop execution.
  • “echo” is pre-built PHP function which instruct server to print anything, which need to be quoted if it’s string.
  • “;”  semicolon is used to end a statement in our case we end echo function so server knows where the print statement ends. There will a lot of use of semicolon so be careful else you will see error.

Now run php by opening following url in your browser –  http://localhost/hello.php

and we are done with hello world program in PHP, after exploring a little more PHP you should follow my other article on how to install wordpress on localhost

Hope this article helped, don’t forget to comment, share and subscribe.

About Author


I am a Passionate Web Developer, Adventure Seeker, Hobbyist Blogger, Amazed by Tech, Party Lover, big Foodie and list goes on.