PHP Tutorial Index

Ma Mahalakshmi V Updated 14 Nov 2026
5 min read ·Lesson 1 of 256

All 256 lessons of the PHP tutorial, grouped by section in learning order. Each title links to the lesson file.

Sections

SectionLessonsLevel
PHP Tutorial1–62Beginner
PHP Functions63–77Beginner
PHP Arrays78–93Beginner
PHP Superglobals94–103Beginner
PHP RegEx104–110Intermediate
PHP Forms111–119Intermediate
PHP Advanced120–148Intermediate
PHP OOP149–179Intermediate
Modern PHP (8.x)180–191Advanced
MySQL Database192–213Intermediate
PHP XML214–220Intermediate
PHP - AJAX221–227Intermediate
PHP Security228–239Advanced
PHP Tools & Deployment240–249Advanced
PHP Projects250–256Advanced

PHP Tutorial

#Lesson
1PHP Home
2PHP Intro
3PHP Install
4PHP Built-in Web Server
5PHP Syntax
6PHP Tags
7PHP and HTML
8PHP Comments
9PHP Multiline Comments
10PHP Variables
11Variables Scope
12Static Variables
13Variable Variables
14PHP Echo and Print
15PHP printf and sprintf
16PHP Data Types
17PHP Booleans
18PHP NULL
19PHP Strings
20String Functions
21Modify Strings
22Concatenate Strings
23Slicing Strings
24Escape Characters
25String Interpolation
26Heredoc and Nowdoc
27Search in Strings
28Multibyte Strings
29PHP Numbers
30PHP Floats
31PHP Casting
32PHP Type Juggling
33PHP Math
34PHP Random Numbers
35PHP Constants
36PHP Magic Constants
37PHP Operators
38Arithmetic Operators
39Assignment Operators
40Comparison Operators
41Increment and Decrement Operators
42Logical Operators
43Null Coalescing Operator
44Spaceship Operator
45Operator Precedence
46PHP If...Else...Elseif
47PHP If
48PHP If Operators
49PHP If...Else
50PHP Shorthand if
51PHP Nested if
52PHP Switch
53PHP Match
54Alternative Syntax
55PHP Loops
56While Loop
57Do While Loop
58For Loop
59Foreach Loop
60Nested Loops
61Break Statement
62Continue Statement

PHP Functions

#Lesson
63PHP Functions
64User-defined Functions
65Function Arguments
66Default Argument Values
67Pass by Reference
68Named Arguments
69Variadic Functions
70Return Values
71Type Declarations in Functions
72Recursive Functions
73Variable Functions
74Anonymous Functions
75Closures
76Arrow Functions
77First-class Callable Syntax

PHP Arrays

#Lesson
78PHP Arrays
79Indexed Arrays
80Associative Arrays
81Create Arrays
82Access Array Items
83Update Array Items
84Add Array Items
85Remove Array Items
86Sorting Arrays
87Multidimensional Arrays
88Array Destructuring
89Array Spread Operator
90Search in Arrays
91Merge Arrays
92array_map, array_filter and array_reduce
93Array Functions

PHP Superglobals

#Lesson
94PHP Superglobals
95$GLOBALS
96$_SERVER
97$_REQUEST
98$_POST
99$_GET
100$_FILES
101$_COOKIE
102$_SESSION
103$_ENV

PHP RegEx

#Lesson
104PHP RegEx
105RegEx Patterns
106RegEx Modifiers
107preg_match
108preg_replace
109preg_split
110PHP RegEx Functions

PHP Forms

#Lesson
111PHP Form Handling
112PHP Form Validation
113PHP Form Required
114PHP Form URL and E-mail
115Form Input Sanitizing
116Escaping Output (htmlspecialchars)
117Checkbox, Radio and Select Inputs
118Sticky Forms
119PHP Form Complete

PHP Advanced

#Lesson
120PHP Date and Time
121Date Formatting
122DateTime Class
123Timezones
124PHP Include
125Include vs Require
126PHP File Handling
127PHP File Open and Read
128PHP File Create and Write
129File Delete, Rename and Copy
130PHP Directories
131PHP CSV Files
132PHP File Upload
133PHP Cookies
134PHP Sessions
135PHP Filters
136PHP Filters Advanced
137PHP Callback Functions
138PHP JSON
139PHP Exceptions
140Error Handling
141Custom Error Handler
142Error Logging
143HTTP Headers and Redirects
144Output Buffering
145Sending Email
146PHP cURL
147Consuming REST APIs
148PHP Generators

PHP OOP

#Lesson
149PHP What is OOP
150PHP Classes and Objects
151The $this Keyword
152PHP Properties
153PHP Methods
154PHP Constructor
155Constructor Property Promotion
156PHP Destructor
157PHP Access Modifiers
158Readonly Properties
159PHP Inheritance
160Method Overriding
161The final Keyword
162PHP Class Constants
163PHP Abstract Classes
164PHP Interfaces
165Polymorphism
166PHP Traits
167PHP Static Methods
168PHP Static Properties
169Late Static Binding
170Magic Methods
171Object Cloning
172Comparing Objects
173Anonymous Classes
174PHP Enums
175PHP Namespaces
176Autoloading Classes
177PHP Iterables
178Iterators
179Object Serialization

Modern PHP (8.x)

#Lesson
180Strict Types
181Union Types
182Nullable Types
183Mixed and Never Types
184Nullsafe Operator
185PHP Attributes
186PHP Fibers
187Readonly Classes
188Property Hooks (PHP 8.4)
189Asymmetric Visibility (PHP 8.4)
190Reflection API
191SPL Data Structures

MySQL Database

#Lesson
192MySQL Database
193MySQL Connect
194MySQL Create DB
195MySQL Create Table
196MySQL Insert Data
197MySQL Get Last ID
198MySQL Insert Multiple
199MySQL Prepared
200MySQL Select Data
201MySQL Where
202MySQL Order By
203MySQL Delete Data
204MySQL Update Data
205MySQL Limit Data
206MySQL Joins with PHP
207Pagination with PHP
208PDO Introduction
209PDO Connect
210PDO Prepared Statements
211PDO Fetch Modes
212PDO Transactions
213PDO Error Handling

PHP XML

#Lesson
214PHP XML Parsers
215PHP SimpleXML Parser
216PHP SimpleXML - Get
217PHP XML Expat Parser
218PHP DOM Parser
219PHP XMLReader
220PHP XMLWriter

PHP - AJAX

#Lesson
221AJAX Intro
222AJAX PHP
223AJAX Database
224AJAX XML
225AJAX Live Search
226AJAX Poll
227AJAX with JSON

PHP Security

#Lesson
228Security Introduction
229Password Hashing
230SQL Injection Prevention
231XSS Prevention
232CSRF Protection
233Session Security
234Secure Cookies
235File Upload Security
236Filesystem Security
237Error Reporting in Production
238Hiding PHP
239Encryption with Sodium

PHP Tools & Deployment

#Lesson
240PHP Configuration (php.ini)
241PHP Command Line (CLI)
242Composer
243PSR-4 Autoloading
244Installing Extensions (PECL / PIE)
245Debugging PHP
246OPcache & Performance
247Garbage Collection
248PHP-FPM
249Migrating to PHP 8

PHP Projects

#Lesson
250Project: Contact Form with Email
251Project: Login & Registration System
252Project: CRUD App with MySQL
253Project: Image Upload Gallery
254Project: Shopping Cart with Sessions
255Project: Simple Blog
256Project: REST API with PHP

0 Comments

Reviewed before they appear

No comments yet.

PHP
PHP Tutorial Index PHP Home PHP Intro PHP Install PHP Built-in Web Server PHP Syntax PHP Tags PHP and HTML PHP Comments PHP Multiline Comments PHP Variables Variables Scope Static Variables Variable Variables PHP Echo / Print PHP printf / sprintf PHP Data Types PHP Booleans PHP NULL PHP Strings String Functions Modify Strings Concatenate Strings Slicing Strings Escape Characters String Interpolation Heredoc and Nowdoc Search in Strings Multibyte Strings PHP Floats PHP Casting PHP Type Juggling PHP Math PHP Random Numbers PHP Constants PHP Magic Constants PHP Operators Arithmetic Operators Assignment Operators Comparison Operators Increment / Decrement Operators Logical Operators Null Coalescing Operator Spaceship Operator Operator Precedence PHP If...Else...Elseif PHP If PHP If Operators PHP If...Else PHP Shorthand if PHP Nested if PHP Switch PHP Match Alternative Syntax PHP Loops While Loop Do While Loop For Loop Foreach Loop Nested Loops Break Statement Continue Statement PHP Functions User-defined Functions Function Arguments Default Argument Values Pass by Reference Named Arguments Variadic Functions Return Values Type Declarations in Functions Recursive Functions Variable Functions Anonymous Functions Closures Arrow Functions First-class Callable Syntax PHP Arrays Indexed Arrays Associative Arrays Create Arrays Access Array Items Update Array Items Add Array Items Remove Array Items Sorting Arrays Multidimensional Arrays Array Destructuring Array Spread Operator Search in Arrays Merge Arrays array_map / array_filter / array_reduce Array Functions PHP Superglobals $GLOBALS $_SERVER $_REQUEST $_POST $_GET $_FILES $_COOKIE $_SESSION \$\_ENV PHP RegEx RegEx Patterns RegEx Modifiers preg_match preg_replace preg_split PHP RegEx Functions PHP Form Handling PHP Form Validation PHP Form Required PHP Form URL/E-mail Form Input Sanitizing Escaping Output (htmlspecialchars) Checkbox, Radio and Select Inputs Sticky Forms PHP Form Complete PHP Date and Time Date Formatting DateTime Class Timezones PHP Include Include vs Require PHP File Handling PHP File Open/Read PHP File Create/Write File Delete / Rename / Copy PHP Directories PHP CSV Files PHP File Upload PHP Cookies PHP Sessions PHP Filters PHP Filters Advanced PHP Callback Functions PHP JSON PHP Exceptions Error Handling Custom Error Handler Error Logging HTTP Headers and Redirects Output Buffering Sending Email PHP cURL Consuming REST APIs PHP Generators PHP What is OOP PHP Classes/Objects The $this Keyword PHP Properties PHP Methods PHP Constructor Constructor Property Promotion PHP Destructor PHP Access Modifiers Readonly Properties PHP Inheritance Method Overriding The final Keyword PHP Class Constants PHP Abstract Classes PHP Interfaces Polymorphism PHP Traits PHP Static Methods PHP Static Properties Late Static Binding Magic Methods Object Cloning Comparing Objects Anonymous Classes PHP Enums PHP Namespaces Autoloading Classes PHP Iterables Iterators Object Serialization Strict Types Union Types Nullable Types Mixed and Never Types Nullsafe Operator PHP Attributes PHP Fibers Readonly Classes Property Hooks (PHP 8.4) Asymmetric Visibility (PHP 8.4) Reflection API SPL Data Structures MySQL Database MySQL Connect MySQL Create DB MySQL Create Table MySQL Insert Data MySQL Get Last ID MySQL Insert Multiple MySQL Prepared MySQL Select Data MySQL Where MySQL Order By MySQL Delete Data MySQL Update Data MySQL Limit Data MySQL Joins with PHP Pagination with PHP PDO Introduction PDO Connect PDO Prepared Statements PDO Fetch Modes PDO Transactions PDO Error Handling PHP XML Parsers PHP SimpleXML Parser PHP SimpleXML - Get PHP XML Expat Parser PHP DOM Parser PHP XMLReader PHP XMLWriter AJAX Intro AJAX PHP AJAX Database AJAX XML AJAX Live Search AJAX Poll AJAX with JSON Security Introduction Password Hashing SQL Injection Prevention XSS Prevention CSRF Protection Session Security Secure Cookies File Upload Security Filesystem Security Error Reporting in Production Hiding PHP Encryption with Sodium PHP Configuration (php.ini) PHP Command Line (CLI) Composer PSR-4 Autoloading Installing Extensions (PECL / PIE) Debugging PHP OPcache & Performance Garbage Collection PHP-FPM Migrating to PHP 8 Project: Contact Form with Email Project: Login & Registration System Project: CRUD App with MySQL Project: Image Upload Gallery Project: Shopping Cart with Sessions Project: Simple Blog Project: REST API with PHP
Ask about this post
AI Ask about this post

Ask questions about PHP Tutorial Index and get answers drawn from it.

Signed-in readers only.