Learn PHP

If you want to be a web developer, you need to learn PHP. Read these free tutorials to master this powerful and popular scripting language.

Getting started with PHP

  • How to Build a Simple REST API in PHP

    How to Build a Simple REST API in PHP

    Sajal Soni
  • How to Use Sessions and Session Variables in PHP

    How to Use Sessions and Session Variables in PHP

    Sajal Soni
  • How to Upload a File in PHP (With an Example)

    How to Upload a File in PHP (With an Example)

    Sajal Soni
  • All PHP content:

    1. How to Append to a File With PHP

      How to Append to a File With PHP

      Tutorial Beginner

      PHP comes with a lot of functions to read and write data to a file. We can also use a few of them to append data to a file. In this tutorial, you'll learn...

    2. How to Check if a File Exists in PHP

      How to Check if a File Exists in PHP

      Tutorial Beginner

      In this tutorial, I will tell you about different functions that you can use to check the existence of a file in PHP.

    3. Understanding PHP Constructors

      Understanding PHP Constructors

      Tutorial Beginner

      In this article, we're going to discuss the basics of constructors in PHP. You'll learn the purpose of PHP constructors and how to use them.

    4. How to Compare Dates in PHP

      How to Compare Dates in PHP

      Tutorial Beginner

      This tutorial will teach you how to compare and calculate the difference between two dates in PHP.

    5. 8 Best PHP Instagram Scripts and Bots in 2025

      8 Best PHP Instagram Scripts and Bots in 2025

      Tutorial Beginner

      Are you looking to save time and use Instagram more efficiently and effectively? Instagram scripts are the easiest way to automate routine tasks, and...

    6. Using the PHP Switch Statement

      Using the PHP Switch Statement

      Tutorial Beginner

      In this article, we’ll discuss the basics of the switch statement in PHP. Along with the syntax of the switch statement, we’ll also go through a couple of...

    7. PHP isset() vs. empty() vs. is_null()

      PHP isset() vs. empty() vs. is_null()

      Tutorial Beginner

      This tutorial will teach you the difference between the PHP isset(), empty() and is_null() functions.

    8. How to Parse JSON in PHP

      How to Parse JSON in PHP

      Tutorial Beginner

      This tutorial will teach you how to read a JSON file and convert it to an array in PHP. Learn how to parse JSON using the json_decode() and json_encode()...

    9. How to Build a Simple REST API in PHP

      How to Build a Simple REST API in PHP

      Tutorial Beginner

      In this tutorial, I'll teach you how to build a simple REST API with PHP and MySQL. You’ll build a simple demo application, which allows you to fetch a list...

    10. Crash Course in the PHP Ternary Operator With Examples

      Crash Course in the PHP Ternary Operator With Examples

      Tutorial Beginner

      In this article, we’ll discuss the ternary operator in PHP. Along with the syntax, we’ll go through a couple of real-world examples to understand how it works.

    11. PHP round, ceil, and floor: Which One to Use?

      PHP round, ceil, and floor: Which One to Use?

      Tutorial Beginner

      In this tutorial, we will learn the difference between the floor(), ceil(), and round() functions in PHP.

    12. Which Back-End to Choose? Node.js vs. PHP

      Which Back-End to Choose? Node.js vs. PHP

      Tutorial Beginner

      In this article, we're going to discuss PHP and Node.js. We’ll discuss the key differences between them to help you choose the right back-end technology for...