How to create, read, update and destroy PHP session data

What is a session and how is it managed? In this article, we're going to look at sessions: starting a session, the session id, session variables and ending a session.

PHP 8 Features & Functions

In this article, we'll look at all PHP 8 new features, from syntax changes to new functions.

PHP Filter Input

What does it mean to filter input and how do we use the filter_input function? In this tutorial we'll look into filter form input; filter input string and filter input integer.

SOLID in PHP: The Liskov Substitution Principle

The Liskov substitution principle (LSP) in simple terms, states that all derived classes must behave according to the reasonable assumptions of the base class.

SOLID in PHP: The Open-Closed Principle

The open-closed principle (in PHP) is a software engineering heuristic that minimizes the knock on effects of updates to your code.

SOLID in PHP: The Single Responsibility Principle

SRP (in PHP) is a rule of thumb that minimizes unintended consequences, and one way to do that, is for each class to have one responsibility only.

Validating a Phone Number in PHP

In this short tutorial, we're going to look at validating a phone number in PHP. Phone numbers come in many formats depending on the locale of the user.

SOLID in PHP: The Dependency Inversion Principle

The Dependency Inversion Principle (DIP) aims to solve the problem of bad design. But what is bad design according to the Dependency Inversion Principle?

PHP Escape Output

How to escape output in PHP: In this tutorial we're going to look at the PHP htmlspecialchars and htmlentities functions.

All PHP 7 New Features

In this article, we'll look at all PHP 7 new features, from PHP 7.0 to the most recent PHP 7.4. We'll go through example PHP code with new functionality.

Converting a timestamp to a date(time)

In this tutorial, we're going to convert a timestamp in PHP to a date or datetime with custom formatting.

Is a PHP variable null or empty?

In this short PHP tutorial, we're going to check if a variable is NULL or empty.


In this article we're going to look at Cross Site Scripting in PHP, otherwise known as XSS. What is XSS in PHP and how does it occur, what are the sources of XSS?

SQL Injection in PHP

SQL injection is an attack that attempts to inject SQL in input data, which is ultimately run against your application database.