
Set up a PHP sandbox to practice fundamentals and syntax, explore data types, functions, loops, and super globals, and work with starter and finished code for a vanilla PHP project.
Master PHP variables as containers for data, including strings, integers, and booleans, and learn dollar-prefixed naming rules, case sensitivity, and conventions like underscores, camelCase, and PascalCase.
Explore how PHP performs implicit type casting (type juggling) and explicit type casting, converting integers, strings, booleans, and null, with practical examples on arithmetic and concatenation.
Apply basic PHP concepts by creating variables for title, author, body, and page title, then display a blog post using concatenation or interpolation, with proper escaping.
Master PHP arithmetic operators—addition, subtraction, multiplication, division, and modulus—and assignment operators, plus built-in math functions like rand, round, ceil, floor, sqrt, pi, abs, max, min, and number_format.
Explore PHP string functions, from string length and word count to position, substrings, and replacements; apply string to lower, string to upper, U.S. words, and trim for clean text.
Explore arrays in PHP from scratch, covering zero-based indexing, dynamic sizing, and mixed data types, with creation via array() and brackets, plus debugging basics like vardump and print_r.
Explore PHP array functions to manipulate arrays. Learn count, sort, push, pop, shift, unshift, slice, splice, sum, search, in_array, explode, and implode.
Explore nested loops in PHP by building a 5x5 css grid with a nested for loop, and a nested while loop using outer i and inner j.
Explore looping through arrays in PHP, using for loops with count and indices, and display names and associative arrays with for each, including keys and values, to build output lists.
Learn to implement conditional HTML output in a PHP HTML template using if statements with shorthand syntax, manage login state using is_logged_in, and display welcome messages or log in prompts.
Compare values with PHP's comparison operators and logical operators, including equal, identical, not equal, not identical, and, or, exclusive or (xor), and not, with practical examples.
Practice dynamic PHP rendering of a job listings page by looping through listings, coloring even items blue, and showing a local badge for New York while hiding empty tags.
Learn to use the ternary operator in PHP as a shorthand for if-else to produce compact html output with templates and refactor examples for cards, badges, and tags.
Loop through a names array using for each or a traditional for loop, skip names starting with a, and reverse and lowercase the remaining names, printing them with line breaks.
Learn how to define and call functions to reuse code, call them multiple times, pass parameters, and work with return values that can be stored or echoed.
Explore how global and local scope govern variable visibility in PHP, including how to pass names as parameters, use global, and encapsulate functions to avoid outside side effects.
Explore optional strict types in PHP by enabling declare(strict_types=1), enforcing int, string, and void type hints in functions to make code more robust and error-free.
Build useful PHP functions to format salaries with a dollar sign and commas, and highlight specific job tags with a yellow span, applying them to job listings.
Create a function to calculate the average salary from job listings, using loops or array helpers like array_column and array_sum, then format and display the result.
Explore anonymous functions in PHP, create closures with the function keyword and use keyword to access outer scope, and implement callbacks and counters.
Master PHP 7.4 arrow functions, a concise anonymous lambda syntax using fn and the fat arrow => for one liner helpers and callbacks like array_map.
Tackle PHP function challenges from scratch: fahrenheit to celsius with named, anonymous, and closure forms; temp 32 and use keyword; print uppercase names and find the longest word with explode.
Explore the fundamentals of object oriented programming (OOP) with objects, classes, and blueprints, covering inheritance, encapsulation, polymorphism, and abstraction, and see how these concepts enable modular, reusable PHP code.
Explore public, protected, and private modifiers that control visibility, and how getters and setters expose private properties within a class, including defaults and inheritance.
Learn to use static properties and methods in PHP via the class name and scope resolution operator, illustrated with a math utility class for pi and sum.
Explain abstract classes as templates with abstract and concrete methods, show a shape base class with a protected name, can't be instantiated, and illustrate circle and rectangle subclasses implementing calculate_area.
Explore interfaces as contracts that declare display and edit methods, implemented by article and video classes, demonstrating polymorphism and consistent content management behavior.
Learn how to access server information in PHP with the $_SERVER superglobal, including request method, server name, protocol, document root, and user agent.
Set and retrieve environment variables with put env and get env in PHP, then use the $GLOBALS super global to access variables across scope.
Explore how the get superglobal retrieves query parameters from the URL, and access them safely with is set or null coalescing. Filter listings by location using array_filter and case-insensitive checks.
Use PHP's post superglobal to receive form data, safeguard inputs with html special chars to prevent XSS, and display submitted title and description after a post submission.
Learn to use the PHP $_FILES superglobal to upload a file from a logo input, create an uploads directory, generate a unique file name, and move the file.
Install MySQL on macOS with Homebrew, start the service, secure the root account, and log in to show databases from the command line.
Learn how to set up MySQL on Windows using Larrigan or alternatives like Zamp or MAMP, connect via GUI or terminal, view databases, and prepare for basic SQL statements.
Here is the link to the cheat sheet:
https://gist.github.com/bradtraversy/c831baaad44343cc945e76c2e30927b3
Learn how to connect PHP to a blog database using PDO, build a DSN with host, port, and db name, pass credentials, enable exception handling, and verify the connection.
Fetch a single post by id from the URL using the get superglobal and display its title and body with a prepared PDO statement and placeholders.
Delete posts in a PHP app by spoofing delete request with a hidden _method in a post form, passing the post id to delete.php, and using PDO with prepared statements.
Set up the main php project folder on Windows or Mac, create an index.php that echoes hello world, and run the php dev server on port 8000 to view it.
Initialize a git repository and create a .gitignore to exclude vendor, node_modules, env, and dsstore. Add, commit, and push changes to the main branch on GitHub.
Create and use PHP inspect helper functions to debug variables with vardump inside pre tags, including inspect and die, and apply these patterns to routing and middleware.
Refactor the router into a class and add get, post, put, and delete methods. Map uris to controllers, load views, and handle 404 errors with an error method.
Learn to pass listings data from the controller to the view using an array, extract to variables, and iterate with foreach to render dynamic job listings.
Explore building a single listing detail page in PHP, using a query string ID, RESTful show convention, and safe prepared statements with named parameters.
Fetch a single listing by id from the query string and display its title, description, salary, location, requirements, benefits, and contact email in a clean, object-oriented PHP view.
This course is broken up into two parts. First, we have seven learning modules to learn the fundamentals of PHP programming, including:
Data Types & Variables
Arrays & Iteration
Control Structures & Conditionals
Functions & Scope
Object Oriented Programming
Superglobals ($_GET, $_POST, $_SESSION, $_COOKIES, etc)
Database Integration & PDO
After that, we go for a hands-on approach and build a job listing website. We build this from the ground up without any framework or libraries. These sections will teach you how to structure a vanilla PHP project and is a great precursor to learning Laravel or another framework.
Here is what we will do in the project videos:
We will create a custom Laravel-like router. We will refactor this a bunch of times to keep adding features like accepting HTTP methods, params and middleware.
We will structure our project into two main folders, which will be called Framework and App. Framework will be the core that includes classes like Router, Database, Validation, and Session. App will include our controllers and views.
We will create CRUD operations for job listings.
We will implement an authentication and authorization system as well as protect routes using custom middleware.
We will add a search feature to search/filter listings by keywords and/or location
We will learn to validate and sanitize data as well as use prepared statements with PDO to protect against SQL injection attacks.
If you are a beginner, I suggest taking the course from the beginning and go through all of the learning modules. If you are more experienced and know the fundamentals, you can jump right into the project.