PHP Lessons

Master server-side logic and Laravel patterns. Build dynamic, data-driven web applications with speed and precision.

💻
Completed0/30
Total XP0
Avg WPM--
Avg Accuracy--
1

Hello World

Write your first PHP script using echo.

Easy ⏱ 10 min
Start Lesson
2

Comments

Learn how to leave notes in your code with comments.

Easy ⏱ 10 min
Start Lesson
3

Variables

Variables in PHP always start with a dollar sign $.

Easy ⏱ 10 min
Start Lesson
4

Strings

Work with text using single or double quotes.

Easy ⏱ 10 min
Start Lesson
5

Numbers

PHP handles integers and floats naturally.

Easy ⏱ 10 min
Start Lesson
6

Arrays Indexed

Store multiple values in a list.

Easy ⏱ 10 min
Start Lesson
7

Arrays Assoc

Key-value pairs allow named items.

Easy ⏱ 10 min
Start Lesson
8

Concatenation

Join strings together using the dot operator.

Easy ⏱ 10 min
Start Lesson
9

Constants

Constants never change value.

Easy ⏱ 10 min
Start Lesson
10

Basic Math

Perform calculations with math operators.

Easy ⏱ 10 min
Start Lesson
🔒

If Statements

Make decisions in your code.

Medium ⏱ 10 min
Locked
🔒

Else Elseif

Handle multiple conditions.

Medium ⏱ 10 min
Locked
🔒

Switch

Switch between many possible values.

Medium ⏱ 10 min
Locked
🔒

Match

The modern way to switch values (PHP 8+).

Medium ⏱ 10 min
Locked
🔒

While Loop

Repeat code while a condition is true.

Medium ⏱ 10 min
Locked
🔒

For Loop

Loop a specific number of times.

Medium ⏱ 10 min
Locked
🔒

Foreach Loop

Iterate over arrays easily.

Medium ⏱ 10 min
Locked
🔒

Functions

Reuse code with functions.

Medium ⏱ 10 min
Locked
🔒

Parameters

Pass data into functions.

Medium ⏱ 10 min
Locked
🔒

Return Values

Get results back from a function.

Medium ⏱ 10 min
Locked
🔒

Scope

Understanding variable visibility.

Hard ⏱ 10 min
Locked
🔒

Type Declarations

Enforce types for better code quality.

Hard ⏱ 10 min
Locked
🔒

Classes

Object Oriented Programming starts with Classes.

Hard ⏱ 10 min
Locked
🔒

Properties

Add data to your classes.

Hard ⏱ 10 min
Locked
🔒

Methods

Add behavior to your classes.

Hard ⏱ 10 min
Locked
🔒

Constructors

Run code when an object is created.

Hard ⏱ 10 min
Locked
🔒

Static

Access members without creating an object.

Hard ⏱ 10 min
Locked
🔒

Inheritance

Share functionality between classes.

Hard ⏱ 10 min
Locked
🔒

Interfaces

Define a contract for classes.

Hard ⏱ 10 min
Locked
🔒

Namespace

Organize your code.

Hard ⏱ 10 min
Locked