Chapter 1: intro

A short chapter on what PHP is, tips and tricks for getting the most out of the course, and installing PHP on your machines.

  1. What is PHP?
  2. Useful Resources
  3. Code Editors
  4. Installing PHP

Chapter 2: working with data

In this chapter, learn the basics of PHP: executing a script, defining variables, exploring data types, and typecasting.

  1. Your first script
  3. Variables
  4. Data Types
  5. Constants
  6. Type Casting
  7. Operators
  8. Type Juggling
  9. Arrays

Chapter 3: control structures

In this chapter, learn how to control logic flow by instructing the PHP interpreter to execute specific blocks of code or to perform repetitive actions with loops.

  1. Flow Control
  2. Switch Statement
  3. Match Expression
  4. Null coalescing operator
  5. Loops
  6. Including Files

Chapter 4: functions

Explore PHP functions in this chapter. Learn to create reusable code blocks, use parameters, and handle return values.

  1. Functions
  2. Variable Scope
  3. Type Hints
  4. Named Arguments
  5. Variadic Functions
  6. Anonymous and Arrow Functions
  7. Callable Type
  8. Passing by Reference
  9. Writing Functions Best Practices

Chapter 5: filling in the gaps

In this chapter, we'll explore various topics that should be covered before we get into object-oriented programming.

  1. Error Control Operator
  2. Operator Precedence
  3. Unsetting Variables
  4. Destructuring Arrays
  5. Understanding HTTP for PHP Developers
  6. HTTP Methods
  7. Encryption for PHP Developers
  8. Installing a Certificate on XAMPP
  9. Server Superglobal Variable
  10. Anatomy of Error Messages
  11. Configuring PHP

Chapter 6: introduction to object oriented programming

In this chapter, we'll start getting into object-oriented programming, creating objects, understanding properties and methods, and the four principles of OOP.

  1. What is Object-Oriented Programming?
  2. Creating Objects and Classes
  3. Constructor Method
  4. Null Safe Operator
  5. Namespaces
  6. Using Constants in Classes
  7. Access Modifiers
  8. Typed Properties
  9. Readonly Properties
  10. Inheritance (OOP Principle)
  11. Overriding Methods
  12. Encapsulation (OOP Principle)
  13. Abstract Classes
  14. Interfaces
  15. Abstraction (OOP Principle)
  16. Polymorphism (OOP Principle)

Chapter 7: php functions

In this chapter, we'll explore the various functions offered by PHP to help you work with various types of data from strings and arrays to files.

  1. String Mutation Functions
  2. String Array Functions
  3. Searching through Strings
  4. String Multibyte Functions
  5. Numeric Functions
  6. Validating Arrays
  7. Array Mutation Functions
  8. Sorting Arrays
  9. Array Mapping
  10. HTTP Headers
  11. File Functions

Chapter 8: regular expressions

In this chapter, we'll learn about how to write and use regular expressions to help us search and replace strings.

  1. Understanding Patterns and Modifiers
  2. Character Classes
  3. Anchors
  4. Multiline Mode
  5. Word Boundary
  6. Escaping Special Characters
  7. Sets and Ranges
  8. Quantifiers
  9. Greedy and Lazy Quantifiers
  10. Groups
  11. Alternation
  12. Working with Unicode

Chapter 9: user submitted data

In this chapter, we'll learn how to work with data submitted by the browser and the steps you should take before performing any action based on the data.

  1. $_GET Superglobal Variable
  2. Concept: Validation
  3. Concept: Escaping
  4. Form Data
  5. Data Validation
  6. Filter Functions
  7. Sanitization

Chapter 10: file uploads

In this chapter, we'll learn how to allow users to upload files. Afterward, we'll process them by extracting file information, validate files, and manipulate the data.

  1. Uploading Files
  2. Validating and Sanitizing Files
  3. Uploading Multiple Files
  4. Downloading Files
  5. Configuring File Uploads

Chapter 11: dates and time

In this chapter, we'll look at how to use PHP's functions and classes for working with dates, timezones, and timestamps. By the end, you'll be able to easily manipulate the date/time.

  1. Date and Time Formats
  2. Unix Timestamps
  3. DateTime Class
  4. Date Intervals and Periods
  5. Timezones
  6. Immutable DateTime Class

Chapter 12: data persistence

In this chapter, you'll learn how to persist data after a request has been completed by using cookies and sessions.

  1. Data Persistence
  2. Cookies
  3. Sessions
  4. Headers Already Sent

Chapter 13: error handling

In this chapter, we'll dive more into errors by configuring PHP and handling exceptions with try-catch blocks.

  1. Configuring PHP for Errors
  2. Error Handler Functions
  3. Understanding Exceptions
  4. Try Catch Blocks

Chapter 14: sql crash course

In this chapter, we'll deviate from our PHP journey to explore databases. We'll learn about SQL syntax and perform basic operations from creating tables to CRUD actions.

  1. Understanding Databases
  2. Creating Tables
  3. Inserting Data
  4. Selecting Data
  5. Updating Data
  6. Deleting Data
  7. Foreign Keys
  8. Joining Tables

Chapter 15: pdo

In this chapter, we learn about PHP's PDO extension for performing SQL queries to interact with databases.

  1. Connecting to a Database
  2. PDO Prepared Statements
  3. CRUD Actions with PDO
  4. Fetching Data with PDO
  5. SQL Transactions

Chapter 16: advanced oop

In this chapter, we'll talk about advanced object-oriented programming features, such as object cloning, traits, and attributes.

  1. Traits
  2. Cloning Objects
  3. Comparing Objects
  4. Anonymous Classes
  5. Autoloading Classes
  6. Useful Class Functions
  7. Attributes

Chapter 17: dependency management

In this chapter, we'll learn how to manage the dependencies in our project from 3rd party vendors.

  1. Understanding Dependencies
  2. The Command Line
  3. Composer

Chapter 18: best practices

In this chapter, we'll talk about best practices that you should always implement in your PHP projects to boost productivity and development.

  1. Understanding PSR
  2. Dependency Injection
  3. Understanding Template Engines
  4. PHPDoc
  5. Understanding Design Patterns
  6. Caching

Chapter 19: security

In this chapter, we'll talk about how to secure your application from various attacks.

  1. CSRF Protection
  2. Password Hashing
  3. Sanitizing HTML

Chapter 20: testing

In this chapter, we'll talk about how to test your application and the various approaches developers take during the development lifecycle of an app.

  1. Unit Testing
  2. Test Driven Development (TDD)

Chapter 21: cheatsheets

These are helpful cheatsheets to help you quickly remember specific function, classes and features.

  1. PHP Cheat Sheet
  2. Composer Cheat Sheet