PHP Beginner 12 h 38 min 58 items
PHP Basics
Learn the PHP language from the ground up: types, strings, control flow, arrays, functions, objects, errors, files, the web, databases and Composer, finishing with a web app you build in plain PHP.
About this course
Learn the language before the framework
PHP powers a huge part of the web. This course teaches the language itself, from your first echo to a complete, secure web application, with no framework in sight. Frameworks come and go; the fundamentals here apply to all of them, and they make any framework much easier to learn later.
The course is split into eleven modules. Each module focuses on one topic, teaches it thoroughly with runnable examples, and ends with a quiz. You need to pass each quiz to unlock the next module, so every new idea builds on something you have already mastered.
What you will learn
- How PHP runs, running scripts in the terminal and in the built in web server, and reading error messages
- Variables, constants, types, operators, type juggling and strict comparison
- Strings: interpolation, heredoc, string functions and formatting output
- Control flow with
if,matchand every kind of loop - Indexed, associative and nested arrays, sorting, and
array_map,array_filterandarray_reduce - Typed functions, named arguments, closures and arrow functions
- Object oriented PHP: classes, visibility, inheritance, interfaces, traits and enums
- Exceptions, files, CSV, JSON and dates
- Forms, validation, escaping, sessions, password hashing and databases with PDO
- Namespaces, autoloading and Composer
- Building a secure guestbook application in plain PHP
How the course works
- 47 short lessons, each with examples you can type and run
- A quiz at the end of every module, with explanations for every answer
- A timed final exam that draws questions from the whole course
- A certificate of completion when you finish
- A printable two page PHP cheat sheet (PDF) to keep
Syllabus
Not started:
What PHP is and how it works
Lesson
Not started:
Installing PHP and choosing an editor
Lesson
Not started:
Running PHP: the command line and the built in server
Lesson
Not started:
Your first program: echo, comments and errors
Lesson
Not started:
Module 1 quiz: Getting started
Quiz
Not started:
Variables and constants
Lesson
Not started:
PHP's data types
Lesson
Not started:
Operators and arithmetic
Lesson
Not started:
Type juggling, casting and comparison
Lesson
Not started:
Module 2 quiz: Variables, types and operators
Quiz
Not started:
Quotes, escapes and interpolation
Lesson
Not started:
Heredoc and nowdoc for longer text
Lesson
Not started:
Essential string functions
Lesson
Not started:
Formatting numbers and output
Lesson
Not started:
Module 3 quiz: Working with strings
Quiz
Not started:
Comparisons and logical operators
Lesson
Not started:
Making decisions with if, elseif and else
Lesson
Not started:
switch and match
Lesson
Not started:
while, do while and for loops
Lesson
Not started:
foreach, break and continue
Lesson
Not started:
Module 4 quiz: Control flow
Quiz
Not started:
Indexed arrays
Lesson
Not started:
Associative arrays
Lesson
Not started:
Nested arrays, destructuring and spreading
Lesson
Not started:
Searching and sorting arrays
Lesson
Not started:
Transforming arrays: map, filter and reduce
Lesson
Not started:
Module 5 quiz: Arrays
Quiz
Not started:
Defining and calling functions
Lesson
Not started:
Parameters and arguments in depth
Lesson
Not started:
Type declarations and strict types
Lesson
Not started:
Scope and static variables
Lesson
Not started:
Anonymous functions, closures and arrow functions
Lesson
Not started:
Module 6 quiz: Functions
Quiz
Not started:
Classes and objects
Lesson
Not started:
Constructors, visibility and readonly
Lesson
Not started:
Static members and class constants
Lesson
Not started:
Inheritance and abstract classes
Lesson
Not started:
Interfaces, traits and enums
Lesson
Not started:
Module 7 quiz: Object oriented PHP
Quiz
Not started:
Exceptions: try, catch and finally
Lesson
Not started:
Reading and writing files
Lesson
Not started:
Working with CSV and JSON
Lesson
Not started:
Dates and times
Lesson
Not started:
Module 8 quiz: Errors, files and data
Quiz
Not started:
Requests, responses and superglobals
Lesson
Not started:
Forms and validating input
Lesson
Not started:
Escaping output and web security basics
Lesson
Not started:
Sessions and cookies
Lesson
Not started:
Databases with PDO
Lesson
Not started:
Module 9 quiz: PHP and the web
Quiz
Not started:
include and require
Lesson
Not started:
Namespaces and autoloading
Lesson
Not started:
Composer: packages and autoloading
Lesson
Not started:
Module 10 quiz: Organizing code
Quiz
Not started:
Planning the guestbook
Lesson
Not started:
Building the guestbook
Lesson
Not started:
Debugging and where to go next
Lesson
Not started:
Final exam
Quiz