Free cookie consent management tool by TermsFeed Generator Introduction to PHP and how to build your first web application in less than 10 minutes | Amir Kamizi
AMIR KAMIZI
Home Blog Courses Books Newsletter Store Membership Buy me a coffee
Introduction to PHP and how to build your first web application in less than 10 minutes

Introduction to PHP and how to build your first web application in less than 10 minutes

Last Updated on Mar 21, 2023

PHP is an open source scripting language that runs on the server, in other words it’s a language for backend development.

Here we are going to build our very first PHP application together.

WHY PHP

PHP can run on Windows, Linux, Mac OS, Unix, etc.

As for databases, PHP can support MySQL, MongoDB, PostgreSQL, SQLite and many other databases.

It’s very easy to learn.

oh and more than 75 percents of all the websites on the internet have PHP as their core language.

Just to get an idea of how powerful PHP is, Websites like Facebook, Wikipedia, Slack, MailChimp, Flickr, SourceForge, Tumblr, Etsy and Yahoo have PHP as their core.

If you go to w3schools’ PHP intro you’ll see this:

PHP is an amazing and popular language!

It is powerful enough to be at the core of the biggest blogging system on the web (WordPress)!
It is deep enough to run large social networks!
It is also easy enough to be a beginner’s first server side language!

enough teasing let’s get started with PHP.

How to Start (Step by Step)

Step 1: Install a web server

first you need to install a local web server on your computer. don’t worry. it’s easy.

There are many options but I personally prefer XAMPP. download it and install it on your computer.

if you open it you’ll see this window:

click on the start button in front of Apache and your window will change to this:

great. now you have a local web server running on your computer.

Step 2: Create a PHP file

first click on the explorer to go to the path that XAMPP was installed.

here you can see a folder called “htdocs”.

all your projects and PHP files should be inside this folder so XAMPP can run them.

so let’s create our first project.

create a new folder called “mysite”

inside this folder create a file called “index.php”

open the file

write this on your file

<?php
echo "hello world!";

now save the file. perfect.

are you ready to see the results?

Step 3: Run

open your browser and go to the following address

localhost/mysite

you should see your “hello world” now.

 

Congratulations!

You have started your journey to become a PHP developer.

https://youtu.be/SnSisDVXt9M

Conclusion

Now you are able to work with PHP. You can add PHP to the unending list of your skills.

I recommend you to create a new file and echo something else. I’m sure you can learn a lot more by the end of today.

If you have any suggestions, questions, or opinion, please leave a comment below. I’m looking forward to hearing from you!

Key takeaways

  • What is PHP
  • Why PHP is a good language to learn
  • How to install a local web server
  • Create your first PHP file
  • Run your PHP application

Category: programming

Tags: #php

Join the Newsletter

Subscribe to get my latest content by email.

I won't send you spam. Unsubscribe at any time.

Related Posts

PHP Trait
Mar 22, 2023 programming

PHP Trait

Today we are going to talk about traits in PHP. A class can extend only one class. But what if you wanted to inherit multiple classes and have their functionalities in your current class? ...

4 Min Read Read More
PHP Method Chaining
Mar 22, 2023 programming

PHP Method Chaining

Today we are going to talk about chaining methods in PHP. It’s cleaner and more readable and I don’t have to refer to my object every time I want to run one of the methods. ...

7 Min Read Read More
What to Do After Learning Programming
Mar 17, 2024 programming

What to Do After Learning Programming

Congratulations! You've learned programming and now have a solid foundation in coding. But what should you do next? ...

7 Min Read Read More
Docker Beginner to Advanced 2025: The Complete Guide for Developers
Jul 18, 2025 programming

Docker Beginner to Advanced 2025: The Complete Guide for Developers

Containers have transformed the way we develop, deploy, and scale applications. Docker leads the charge, offering a developer-friendly platform to create consistent, portable environments from development to production. ...

27 Min Read Read More

Recommended Courses

Introduction to Machine Learning in PHP

Introduction to Machine Learning in PHP

Learn to Build Different Machine Learning Models Easily ...

PHP Tutorial Beginner to Advanced

PHP Tutorial Beginner to Advanced

Learn everything you need to start a successful career as a PHP developer ...