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. Exception Handling in Laravel

      Exception Handling in Laravel

      Tutorial Beginner

      In this article, we're going to explore one of the most important and least discussed features of the Laravel web framework—exception handling.

    2. Build a REST API With Laravel

      Build a REST API With Laravel

      Course Beginner

      Laravel lets you easily and quickly build RESTful APIs. This could be the back-end to a front-end web app, a data source for a mobile app, or a service for...

    3. How to Send Emails in Laravel

      How to Send Emails in Laravel

      Tutorial Beginner

      In this article, we're going to explore the Mail API in the Laravel web framework. Laravel uses the popular Symfony Mailer component, which is easy to use...

    4. Object-Oriented PHP for Beginners

      Object-Oriented PHP for Beginners

      Tutorial Intermediate

      In this post, you'll learn the concepts behind object-oriented programming (OOP), a style of coding in which related actions are grouped into classes to aid...

    5. How to Register and Use Laravel Service Providers

      How to Register and Use Laravel Service Providers

      Tutorial Intermediate

      In this post, you'll to understand the concept of service providers in the Laravel framework. You'll also learn how to code a custom service provider, and...

    6. 20 Useful Laravel Packages Available on CodeCanyon (And 3 Free)

      20 Useful Laravel Packages Available on CodeCanyon (And 3 Free)

      Tutorial Beginner

      If you’re coding for the Laravel framework, then it’s time to discover what you’ve been missing by checking out these popular Laravel tools and packages to...

    7. How to Check Your WordPress PHP Version

      How to Check Your WordPress PHP Version

      Tutorial Beginner

      In this article, I'll explain to you what PHP is and tell you why it is important to regularly check for updates. Then I'll give you a step-by-step guide to...

    8. How to Use assert() in PHP

      How to Use assert() in PHP

      Tutorial Beginner

      In this article, I'll teach you about the assert() function in PHP. I will teach you what exactly it is, how it works, and the right context to use it in...

    9. Add Days to a Date With PHP DateInterval

      Add Days to a Date With PHP DateInterval

      Tutorial Beginner

      In this quick tip, you will learn how to add days to a date in PHP using the DateInterval class.

    10. 30+ PHP Best Practices for Beginners

      30+ PHP Best Practices for Beginners

      Tutorial Intermediate

      PHP is the most widely used language for programming on the web. Here are 30+ best practices for beginners wanting to gain a firmer grasp of the fundamentals.

    11. PHP Magic Methods Cheatsheet

      PHP Magic Methods Cheatsheet

      Tutorial Beginner

      In this post, I'll give you a cheatsheet quick reference to all the magic methods available in PHP.

    12. Pop and Shift Arrays With PHP: When to Use Each One

      Pop and Shift Arrays With PHP: When to Use Each One

      Tutorial Beginner

      In this quick tip, I'll show you how to use the array_pop() and array_shift() functions in PHP to get the first and last elements of an array.