
This course has migrated to https://coachingbyrick.com. See why it's important to move to the new platform.
Rick introduces himself as a software engineering professional with 17 years of experience. He started his career in 2003.
Important information on how course updates work, as well as ways to optimize your experience throughout this course
The Q&A section is the best place to get the assistance you need for any questions about this course. While instructors will reply to questions in the Q&A section, remember that helping other students is an excellent way to learn the material even further!
Rick will upload his code after each lecture, and any material referenced in the lecture will also be made available in the resources section for each lesson. This lecture helps you locate those resources.
Learn which videos to watch to set up your dev environment.
Learn about how we look at PHP 7 vs PHP 8 in this course.
In this lecture, you'll learn how to setup your Windows or Mac system with Apache, MySQL, and PHP, so you can build awesome software on development machine.
This short lecture will give you the correct command to run on Linux and Windows in order to set your root user's password in MySQL.
Learn an alternative way to change your password on Windows and Mac using XAMPP.
Here's another solution to the problem of not being able to log in as root@localhost.
In this lecture, you'll learn how to setup your Linux system with the LAMP stack so you can build awesome software on what's typically the de facto standard in servers that run PHP.
Learn how to configure independent sites in Apache so you can use something other than localhost for your development.
Eclipse PDT is the IDE that we'll use for this course. It offers an excellent way to write and manage your PHP projects.
Coding standards help you keep your code consistent so that other engineers can work with it much more easily. Likewise, you'll find it easier to work with standardized code from other engineers.
Learn more about `echo` and how to use `print` in PHP. These are two popular ways to print information to the console or browser in PHP!
Learn how to build your first PHP program - Hello World!
Learn about primitive data types, such as int, float, string, and boolean. We'll also discuss variables and touch on the reference operator.
Learn how to enable code completion in Eclipse.
In this lecture, we'll explore the four types of strings in PHP: single quoted, double quoted, heredoc, and nowdoc.
Learn how single-quoted and double-quoted strings work differently with string interpolation, and what "string interpolation" even means!
This lesson describes the special meaning of \n, \t, \r, \\, and other escaped character sequences. You'll also learn about the difference between how single-quoted strings and double-quoted strings treat those sequences.
In PHP, you can index into strings using both positive and negative offsets. This lecture will give you an excellent overview of how to do that.
Learn about mathematical operators, and also how PHP treats some data types when mathematical operators are used. (Ex. A string plus another string is not concatenation!)
Loosely-typed languages have certain advantages, and as you'll soon learn, disadvantages, from what strongly-typed languages have. We'll go over the idiosyncrasies of how PHP handles it's data types.
What happens when you need to declare a variable, but you don't yet have a value to assign? Use null!
Learn how to concatenate strings together, as well as what happens when you concatenate other data types.
Practice writing your name... in style!
Find out if you wrote your name correctly.
Learn the difference between an indexed array and an associative array. These are the two types of arrays that PHP supports.
Learn the benefits and drawbacks of using echo, print, print_r, and var_dump in PHP.
Learn how to work with arrays using in_array, array_key_exists, and array_slice, as well as popular problems and solutions with empty and isset.
Practice the basics of PHP in this challenge that helps you put together everything you've learned!
So many programmers use isset() as the opposite of empty(), but they are NOT opposites! This important lecture will help you write quality code that doesn't fall apart because of a popular error.
Explore my solution to the section challenge. We'll use string concatenation, indexing into strings, and creating an indexed array to hold our words.
Learn how to run a PHP file in your browser, how to keep your errors private, and learn a bit about the differences between console and browser apps.
Do you know that something can evaluate to true without being a boolean data type? Do you know how to check if an empty string is false? What about keeping your data type checked so you know if something is truly true, or truly false? In this lesson, you'll learn all about true, false, falsey, and truthy!
Let Rick help improve your flow.... with control structures! In this lesson, we examine the usage of if/else if/else in PHP.
Learn about the differences in using switch/case versus if/else if/else.
Ternary expressions help you keep simple it/else statements nice and terse. After this lecture, you'll have a complete understanding of ternary expressions.
In this lecture, we'll look at how we can handle form submissions in the browser.
Learn how to get information from the URL, and how $_REQUEST makes things more difficult to keep your project stable.
Try your hand at using query parameters from the browser.
Solution for the midsection challenge
Find out how to get headers your browser sends in its request, as well as a myriad of different information from your server using the $_SERVER PHP superglobal.
Learn how to upload a file using PHP.
Guess a number between 1 and 10, and maintain state in the browser.
Learn how to avoid XSS attacks by properly sanitizing your output.
Learn how to use cookies to make the guessing game more difficult.
Cookies are userland data, and yet some people store SQL queries in their cookies! That's terrible, and I'll show you why that's so bad.
Sessions allow your program to stay secure, and in this lesson Rick will show you how to avoid session-hijacking, as well as the ins and outs of sessions in PHP.
Your challenge is to set a cookie or session variable when the given input to your form is correct.
See the solution to the server-side validation puzzle.
The for loop is the most popular loop, and in this lecture you'll learn how to use it in PHP.
In this lecture you'll learn how to print each item in an array, and also how to skip over items while looping through an array.
Do you know the difference between $i++ and ++$i? By the end of this lecture, you'll know that and more!
In this lecture we'll discuss one of the gotchas that happens when nesting for loops, and how you can avoid the pratfall.
Learn how to print multiplication tables in PHP.
Try out what you just learned!
Learn how "continue" and break" function, as well as what the optional number after each one means.
Looping through arrays is a breeze with the foreach loop! In this lecture you'll learn how to work with the foreach loop in PHP.
While loops have several specific uses, such as video game loops, as well as looping through files. In this lecture, we'll compare the while loop to the structure of the for loop.
The do while loop evaluates the expression after running the first iteration. In this lecture, we'll see how it compares to a while loop.
What does $i += 2 tell PHP to do? Find out in this lecture!
Your section challenge is to implement Binary Search. We'll discuss the challenge in this lecture.
See Rick's solution to the Binary Search challenge.
Learn how to define constants in PHP, as well as write data to a file.
Learn how to read a file into PHP and handle line breaks in this lecture.
The evil eval() language construct could wreck your entire website and even your server if given the chance. Watch this lecture to see why eval() is truly evil.
In this lecture, you'll see why unserializing userland data can compromise your system.
Learn how to write functions in PHP, as well as how PHP 7 type hinting works. Type hinting in PHP has its benefits and drawbacks, as you'll see.
Try out your knowledge in functions and arrays!
Solution to the challenge
Learn how to work with anonymous functions/closures/lambdas in PHP.
Recursion is an alternative to iteration in many situations. Learn this alternative so you can choose between iteration and recursion for better running times and memory options when you write your code.
Learn how you can recurse on two functions at the same time with mutual recursion.
Generators allow you to return a value while maintaining state within a function. They provide you with a memory-efficient way to iterate over something.
Learn how to collect user input through the command line in PHP.
Learn how to create an executable PHP file called a Phar file.
Your challenge is to combine both the functions from the lesson on recursion, and the ones from the lesson on mutual recursion, to write all even numbers to a file.
See Rick's solution to the section challenge.
With classes in PHP, there's nothin' on top, but a bucket and a mop, and an illustrated book about birds.
Learn what static methods are, and how to use them in PHP.
Learn how to add variables to your class as static properties.
Learn how to use constructors in PHP.
Learn the difference between a static and dynamic method, and how to use one.
Learn the difference between using a dynamic property and a static property.
Learn how to include other files in your PHP application using include, include_once, require, and require_once, as well as the difference between those.
Learn how to use namespaces in PHP, as well as what a namespace even is.
Learn how to automatically load your classes in PHP.
Learn about Dependency Injection, as well as the Dependency Inversion design principles by using interfaces in PHP.
Learn the benefits of using an abstract class to handle certain operations that pertain to multiple subclasses, in this lecture on a real-world example of using abstract classes.
Traits add certain attributes to your objects. In this lesson we'll learn how we can use traits to handle our needs for our DB driver project we're working on.
Learn how to throw custom exceptions, why not to throw the base \Exception class or catch it, and how to handle exceptions in PHP.
This lecture is your briefing on the mid-section challenge. You'll build a toaster class to prove your knowledge in OOP.
See Rick's solution to the toaster challenge!
Let's improve our code a bit with type hints in our toaster class.
Learn all about private, protected, and public scopes in classes and why those are important.
After learning more about OOP, we'll now take a closer look at the self, static, and $this keywords in PHP.
We'll use Composer to install various packages for PHP. This lecture will show you how to install Composer on your operating system.
Guzzle is a 3rd-party project that allows you to easily contact remote APIs and more. In this lecture, we'll install it and explore the /vendor directory that Composer creates for us.
To better understand Guzzle, we'll grab the public HTML source code from the Google.com website.
In this lecture, you'll see that the section challenge changed slightly. We'll discuss the changes in this lecture.
Your section challenge is to build a driver backbone for the DarkSky API using the knowledge you've acquired over the entire course. This lecture will brief you on the project.
See Rick's solution to the Driver Backbone Challenge.
Learn all about the Unix Epocolypse and how it affected the timespace continuum for all software to come.
Learn how to use the popular date() function to display the date for a given Unix timestamp.
The DateTime class in PHP makes working with dates and times much more flexible than the date() function. In this lecture we'll begin working with the DateTime class.
The DateTime class gives you the opportunity to add and subtract dates and time with relative ease. We'll look at how we can do that in this lecture.
Carbon makes it a breeze to work with dates and times in PHP. In this lecture, we'll briefly discuss how to use the popular Carbon library.
Your section challenge is to print your birthday in all three datetime tools we've worked with in this section.
See Rick's solution to the birthday challenge.
In this lecture we'll use MySQL Workbench to connect to our local MySQL server.
In this lecture, we'll create our database that we'll use for this section.
In this lecture, we'll connect to our database using PHP PDO.
Learn the MySQL syntax for inserting data into the database.
In this lecture, we'll work on inserting data into our database using PHP.
Learn how to write a query for MySQL that selects the data you're looking for.
In this lecture we'll select data from our database using PHP.
Learn how to update your data using MySQL UPDATE statements.
Learn how to update your data in the database using PHP.
Learn how to write a DELETE statement for MySQL.
Learn how little Bobby Drop Tables dropped the "students" table with a SQL Injection.
In this lecture, we'll learn how to delete data from the database using PHP.
Prepared statements thwart SQL injections. We'll learn how to implement this simple, yet powerful, defensive strategy in PHP.
Your section challenge is to rewrite all statements to use prepared statements.
See Rick's solution to refactoring all of the queries to use prepared statements.
Learn about why SOLID, DRY, and YAGNI are software design principles that you should follow to keep your code clean, maintainable, and obvious.
The Single Responsibility Principle says your classes, methods, and functions should do one thing, and do it well.
The Open/Closed Principle states that your code should be open for extension, but closed for modification. In this lecture, we'll take a deeper look at what that means.
The Liskov Substitution Principle says that we can substitute methods for other methods (polymorphism) or classes for other classes (Dependency Injection and Inversion). Learn why that's important.
The Interface Segregation Principle says that we should only require the classes that implement the interface, to implement methods that correspond to the interface topic, without requiring us to implement methods the class will never use.
The Dependency Inversion Principle states that we should make our dependency injections rely on the most abstract version of a class that allows us to still satisfy the requirement. Learn more about this topic in this lecture.
YAGNI in an acronym that stands for "You Aren't Gonna Need It". In other words, don't build things that you plan to use, until you actually go to use them.
DRY is an acronym that stands for "Don't Repeat Yourself". In other words, avoid code duplication so you only maintain your code in one place, not 70. In this lecture, we'll look at why DRY is important.
====================
UPDATED FOR PHP 8!
====================
This course is/will/has...
A living, breathing, course continuously updated whenever new significant versions of PHP get release, whether that's PHP 7.0 to 7.1, PHP 7.x to PHP 8.x, or later, I'll be sure you have the latest information as quickly as possible in new videos.
Teach you the difference in coding standards that makes the difference between a PHP artisan, and someone who's self-taught and spends years in the dark. (HINT: SOLID, DRY, YAGNI! You'll learn what they mean and why they're important, and also why your code should comment itself.)
Has several micro-courses to help you grow in ways that matter, potentially putting you six-figures or more in profit!
Bread and Butter (Basics and Advanced PHP Concepts)
What about the main course? (Hint: it's not a dinner roll! :) ) Here's what you can expect.
Getting started with Eclipse PDT (free)
Variables (including global variables)
Data types (arrays, strings, int, float, etc.)
Superglobals ($_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_REQUEST) - The general I/O for your PHP application
Flow control (if/elseif/else, for, foreach, while, do/while, switch) - Control what happens in your application
Ternary statements
Error handling with try/catch/finally
Functions (including anonymous/lambda functions)
Type Hinting (classes, array, scalar types [New in PHP 7!])
OOP (Classes, methods, properties [static and dynamic], scope, and more!)
Generators
GuzzleHTTP for API interaction
Course Project
During the course, we will learn how to build a basic online freelance marketplace in Laravel 7. Rick spent 2 years of his life building a very elaborate online freelance marketplace, and he'll distill his knowledge down into the basics so we can fit it into a course project. You'll also hear about numerous other options you could use to expand the marketplace into your own awesome creation, while reinforcing your knowledge in PHP.
What's an online freelance marketplace? Simple. It's a place where vendors and shoppers meet each other and transact service-based business. An example of some of them are Upwork, Freelancer, and Fiverr.
The project includes the following:
Laravel 7 training
Git using GitHub
Authentication system, and a deep dive into how that works behind the scenes.
Create and manage a project screens
Project search and Laravel Scout with Algolia's free tier
CI/CD with Travis CI
Micro-courses:
PHP is one of the most prevalent languages on the internet, but HTML and JavaScript are staples of any quality frontend. Furthermore, without a solid income from your investment, you'd only be spending money in hopes of getting your next job. Don't worry! I'll clue you in on how I started on government welfare, but went on to make six figures on Upwork, and how you can follow in my footsteps. (Please note that I cannot guarantee that you will make six figures, or even a single penny by using what you learn, but if you give it your all, I'd be shocked if you weren't successful at making some nice money.)
My secrets as a six-figure Upwork freelancer - PHP has the uncanny double standard of being EXTREMELY popular on online freelance marketplaces, such as Upwork, but almost non-existent in traditional jobs. If you're looking to work for yourself, learn PHP and go freelance. If you'd prefer to work for the man, try Node.js, Python, Java, or another language popular for that career path. I'll show you how to succeed as a six-figure freelancer on Upwork.
You'll also learn the various caveats of each of the major online freelance marketplaces, such as Fiverr, Freelancer.com, and Upwork, so that you can make your own decisions on where to start your journey as a freelancer.
SOLID, DRY, YAGNI, and other tips that'll make you a PHP artisan instead of just someone writing code.
S — Single responsibility principle
O — Open/closed principle
L — Liskov substitution principle
I — Interface segregation principle
D — Dependency inversion principle
DRY — Don't Repeat Yourself!
YAGNI - You Aren't Gonna Need It!
WordPress and WooCommerce - WordPress powers 35% of the entire internet at the time of writing this in February 2020. Just a couple months ago, it powered 34%! That's a massive market share, and it's no surprise that Upwork is filled to the brim with WordPress and WooCommerce projects. During this course we'll build the following WordPress plugins from scratch, while keeping our codebase FAR cleaner than most WordPress plugins, or even WordPress core itself.
Custom WooCommerce Thank-You Page - Create a custom thank-you page for your WooCommerce installation on WordPress.
Featured Products Widget - Build a widget to display an admin-defined list of posts on your sidebar, footer, or anywhere else your theme supports widgets!
Laravel 7 - Laravel is the most popular PHP framework at the time of writing, and we'll learn how to build software in laravel. You'll learn the components that make up the framework, such as model, views, controller, the Artisan CLI and more. You'll also get hands-on training in Laravel Spark and Laravel Nova not taught in other courses in PHP and Laravel!
Vue.js - Learn the very basics of using Vue.js to build your frontend. As we'll be using Laravel, Vue.js will come up somewhat often when working with their products, and you should be able to hit the ground running with Vue.js.