PHP Course Table of Contents

What PHP Does

WordPress Folk Knowledge (to go somewhere): Basic WordPress debugging, and how to deactivate a plugin that’s breaking your site

  1. What PHP Is: A Programming Language that Outputs HTML
  2. What PHP Will Let You Do: Talk to WordPress’s PHP Architecture/Go “Under the Hood”
  3. Introduction to Servers and WordPress Architecture [ and]
  4. Creating Your Sandbox: How to Set Up a WordPress Site Locally or Remotely [shill for SiteGround!]

Project: Get a WordPress instance running either locally or remotely

PHP Programming Fundamentals

Short Intro Chapter: You are about to learn the basic elements that let you put PHP on the page, and to start to work with variables and functions

  1. WordPress Folk Knowledge: Do It the WordPress Way (we’ll point you over to Up and Running often)
  1. Basics of PHP Syntax: the <?php Tag: []
  2. Basics of PHP Syntax: Comments
  3. Put Stuff on the Page: echo: []
    1. WordPress Folk Knowledge: Where All the HTML Is in WordPress
  4. Strings 102: Concatenating Strings []
  5. PHP Variables [ but needs edited/excerpted and needs to cover assignment ($me = ‘yes’) if it doesn’t]
  6. Key Data Types []
  7. PHP Mathematical Operators (*, /, %, etc.) [ and include a short discussion of modulo from]
  8. PHP Arrays []

Project: Write a PHP script that calls a function to do a calculation

Intermediate PHP Programming: Control Flow

Short Intro Chapter: You are about to learn a lot of topics that sum up to “control flow,” which is what makes PHP a programming language []

  1. PHP if()-statements [ and include tips on writing good PHP conditionals from; include two syntax options]
  2. PHP Logical Operators (==, ===, ||, !==, &&, etc.) []
  3. Introduction to PHP Functions []
    1. WordPress Folk Knowledge: There’s a Function for That (e.g. wp_remote_get(), wp_mail(), get_template_part())
  4. Working with PHP Function Arguments (Including Default Values) []
    1. WordPress Folk Knowledge: $args: Arrays of Function Arguments (because PHP is limited: you can’t have optional arguments/named parameters in PHP) – Functions Calling Functions (a function name string as a function arg)
  5. Introduction to PHP’s return:
    [, point over to the_() and get_the() template tags, talk about actions and filters]

    1. WordPress Folk Knowledge: Getting Used to Event-Driven Programming: Everything Touches Everything Else Uncomfortably
    2. WordPress Folk Knowledge: Turn echo into return with Output Buffering
  6. Loops: while() Loops [; include two syntax options; reference the Loop]
    1. WordPress Folk Knowledge: Go Learn Themes Now
  7. Loops: foreach() Loops [, including discussion of rare use of for() loops; include two syntax options]
  8. Loops: early exit with break; and continue;
  9. Variable scope, focus mostly on “can’t call outside variables inside a function by default” []
    1. WordPress Folk Knowledge: Global State and Global Variables and Why They’re Bad But Used All the Time in WordPress (important ones like $post)
  10. include(), require_once(), and similar [reference get_template_part()]
    1. WordPress Folk Knowledge: Front Controllers: Why Nothing Lives in the Root
  11. Fun to Ignore: case : and switch : statements and why you should never create them yourself; closures and anonymous functions


  1. Introduction to OOPHP: [, will probably need to build out from there; also include conceptual intro from UaR at]
    1. WordPress Folk Knowledge: Mmm, Spaghetti: Backwards-Compatibility, Technical Debt, and WordPress’s Diverse Codebase
  2. Private and public properties and methods in OOPHP [start with, build out from there]
  3. Class inheritance in OOPHP: []
  4. __construct(): []
  5. Other magic methods other than __construct()
  6. OOPHP and WordPress hooks: []
  7. OOPHP and static methods: []
  8. Describe using “fake namespaces” and say a few words about Composer autoloader