PHP is a language for building the server side of websites. The course starts with the basics, continues with object-oriented programming and goes on to collections, Big O analysis, unit testing, SOLID principles, design patterns and REST APIs. Each lesson gives you a prompt, the code and its output. Choose a section below to begin.
- PHP Tutorial Lessons: 55
The basics of PHP: syntax, variables, data types, strings, numbers, operators, conditions, loops, functions, arrays and superglobals. Start here if you are new to PHP.
Start with: PHP Tutorial → - PHP OOP Lessons: 14
Object-oriented programming in PHP: classes and objects, constructors, access modifiers, inheritance, interfaces, traits and namespaces.
Start with: PHP Object-Oriented Programming → - PHP Collections Lessons: 7
Everyday work with collections in PHP: transform, filter, group and sort them, take parts of them and calculate totals.
Start with: PHP Transform a Collection → - PHP Big O Analysis Lessons: 8
How to measure how fast code runs and how much memory it uses, from constant time O(1) to exponential time O(2ⁿ), with examples in PHP.
Start with: PHP Big O Introduction → - PHP Unit Testing Lessons: 5
How to write tests that show your PHP code works: first tests, table-driven tests, testing errors and best practices.
Start with: PHP Unit Testing → - PHP SOLID Principles Lessons: 5
Five principles for code that is easy to change and maintain, each one shown with PHP examples.
Start with: PHP Single Responsibility Principle → - PHP Design Patterns Lessons: 24
The 23 classic design patterns, such as Singleton, Factory Method, Observer and Strategy, each one with a PHP example.
Start with: PHP Design Patterns → - PHP REST API Lessons: 8
How to build a REST API in PHP: JSON, an HTTP server, routing, methods and status codes, middleware and a complete CRUD example.
Start with: PHP REST API Introduction →