Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

PHP

Learn how PHP runs on the server and turns code into web pages. You will work with variables, types, arrays, decisions, functions and loops, then read URLs and forms safely — all while building a small online bookshop.

Ready to learn6 sections · 23 lessons
Start learning

Course curriculum

Introduction to PHP4 lessons

See where PHP runs and where it came from, learn its basic writing rules, and understand how variables, scope, types and casting behave.

  1. What PHP Is and Where It Came From12 min
  2. Basic PHP Syntax12 min
  3. Variables and Scope14 min
  4. Data Types and Casting15 min
Output and Arrays4 lessons

Choose between echo, print, var_dump and print_r, then store data in indexed, associative and multi-dimensional arrays.

  1. Printing Values: echo, print, var_dump, print_r12 min
  2. Indexed Arrays12 min
  3. Associative Arrays13 min
  4. Multi-dimensional Arrays15 min
Conditionals4 lessons

Choose the right branch with if and elseif, compare one value against many with switch and match, and handle missing values with ?? and ?->.

  1. if, elseif and else12 min
  2. switch12 min
  3. match13 min
  4. The Null Operators: ?? and ?->14 min
Functions5 lessons

Define constants, write typed functions with parameters and return values, use defaults and named arguments, pass functions as callbacks, and write recursive and variadic functions.

  1. Constants11 min
  2. Declaring Functions: Parameters and Return Values13 min
  3. Default Values and Named Arguments13 min
  4. Anonymous, Callback and Arrow Functions15 min
  5. Recursion and Variadic Functions15 min
Loops and Includes3 lessons

Repeat actions with while, do-while and for, walk arrays with foreach, and split a site into shared files with include and require.

  1. while, do-while and for13 min
  2. foreach13 min
  3. include, require and the _once Versions14 min
HTTP Methods and Forms3 lessons

Read query strings with $_GET, handle forms with $_POST using a safe method-validate-act-redirect recipe, and understand $_REQUEST and $_SERVER.

  1. $_GET — Reading the Query String13 min
  2. $_POST and Processing a Form16 min
  3. $_REQUEST and $_SERVER13 min