Learn PHP — Advanced
Build reports and object collections in PHP, combining validation, sorting and calculations. Learn inheritance, magic methods, typing, iterators, generators, regular expressions, and exception handling and testing.
COURSE OVERVIEWREADY
Lessons: 83
Quizzes: 14
All steps: 97
$Ready to start
What you will learn
- Design classes, collections and validation rules, and use inheritance, interfaces and magic methods.
- Process and report data through mapping, filtering, grouping, sorting, summation and transformation chains.
- Create custom iterators and lazy generator pipelines, and use SPL structures, references and object cloning.
- Use regular expressions, strict comparisons and typing, and throw, catch and test exceptions while preserving cleanup in finally.
SYLLABUS / 97
Course curriculum
Work through the curriculum step by step. Completed stages are marked, and you can open the next available stage.
83 lessons14 quizzes97 steps total
- 01LESSONLESSON 1: Anonymous functions — creating them (function)Available now
- 02LESSONLESSON 2: Anonymous functions as an argument (array_map)Locked
- 03LESSONLESSON 3: Anonymous functions in array_filterLocked
- 04LESSONLESSON 4: Closures (use)Locked
- 05LESSONLESSON 5: Arrow functions (fn)Locked
- 06LESSONLESSON 6: Variable functions — you will call a function by a name held in a variableLocked
- 01QUIZQuiz 1: lessons 1–6Locked
- 07LESSONLESSON 7: A function returning a functionLocked
- 08LESSONLESSON 8: Variable arguments – func_get_argsLocked
- 09LESSONLESSON 9: Variadic arguments – ...$argsLocked
- 10LESSONLESSON 10: Recursion: Fibonacci — you will compute the successive values of a sequence recursivelyLocked
- 11LESSONLESSON 11: Recursion: summing multidimensional arraysLocked
- 12LESSONLESSON 12: Multidimensional arrays – creation and accessLocked
- 02QUIZQuiz 2: lessons 7–12Locked
- 13LESSONLESSON 13: array_map on an array of arraysLocked
- 14LESSONLESSON 14: array_filter on an array of arrays — rejecting by a nested predicateLocked
- 15LESSONLESSON 15: array_reduce on an array of arrays — you will reduce a structure to a single value/setLocked
- 16LESSONLESSON 16: Sorting an array of arrays by key (usort)Locked
- 17LESSONLESSON 17: Sorting by a nested value (custom comparator)Locked
- 18LESSONLESSON 18: Multi-level associative arrays — you will organize data in dictionaries within dictionariesLocked
- 03QUIZQuiz 3: lessons 13–18Locked
- 19LESSONLESSON 19: References in arrays and passing by referenceLocked
- 20LESSONLESSON 20: By value vs by reference — you will compare the costs and the semantic effectsLocked
- 21LESSONLESSON 21: Destructuring – list()Locked
- 22LESSONLESSON 22: Destructuring – short []Locked
- 23LESSONLESSON 23: Spread operator for arrays (...)Locked
- 24LESSONLESSON 24: Merging arrays with spreadLocked
- 04QUIZQuiz 4: lessons 19–24Locked
- 25LESSONLESSON 25: OOP: creating a class and an objectLocked
- 26LESSONLESSON 26: OOP: properties and methods — you will add fields and behaviors to a classLocked
- 27LESSONLESSON 27: OOP: constructor and destructor — you will initialize state and clean up resourcesLocked
- 28LESSONLESSON 28: Visibility: public — you will expose a class's public APILocked
- 29LESSONLESSON 29: Visibility: private — you will hide implementation detailsLocked
- 30LESSONLESSON 30: Visibility: protected — you will prepare classes for inheritanceLocked
- 05QUIZQuiz 5: lessons 25–30Locked
- 31LESSONLESSON 31: Inheritance (extends) — you will build a child classLocked
- 32LESSONLESSON 32: Method overriding — you will change the behavior of an inherited methodLocked
- 33LESSONLESSON 33: Polymorphism — you will call the same method on different objectsLocked
- 34LESSONLESSON 34: Domain collection (e.g. BookCollection) — you will design a class that wraps an array of objectsLocked
- 35LESSONLESSON 35: Interfaces – interface and implements — we define a contract and its implementationLocked
- 36LESSONLESSON 36: Multiple interfaces — you will combine several contracts in one classLocked
- 06QUIZQuiz 6: lessons 31–36Locked
- 37LESSONLESSON 37: Trait – sharing codeLocked
- 38LESSONLESSON 38: Namespace – creating and usingLocked
- 39LESSONLESSON 39: Class aliasing (use) — you will shorten fully qualified namesLocked
- 40LESSONLESSON 40: Magic: __get — you will intercept reads of nonexistent propertiesLocked
- 41LESSONLESSON 41: Magic: __set — controlling the setting of propertiesLocked
- 42LESSONLESSON 42: Magic: __call — you will handle calls to nonexistent methodsLocked
- 07QUIZQuiz 7: lessons 37–42Locked
- 43LESSONLESSON 43: Magic: __callStatic — the equivalent for static methodsLocked
- 44LESSONLESSON 44: Magic: __toString — you will turn an object into a stringLocked
- 45LESSONLESSON 45: Magic: __invoke — an object callable like a functionLocked
- 46LESSONLESSON 46: Magic: __isset and __unset — you will react to checking and removing propertiesLocked
- 47LESSONLESSON 47: Argument typing — you will enforce parameter types of functions/methodsLocked
- 48LESSONLESSON 48: Return typing — you will declare the type of the returned valueLocked
- 08QUIZQuiz 8: lessons 43–48Locked
- 49LESSONLESSON 49: Union types (PHP 8+) — you will allow multiple types in one declarationLocked
- 50LESSONLESSON 50: The nullsafe operator (?->) — you will safely traverse a chain of callsLocked
- 51LESSONLESSON 51: Null coalescing (??) — you will set sensible default valuesLocked
- 52LESSONLESSON 52: match instead of switch (PHP 8+)Locked
- 53LESSONLESSON 53: declare(strict_types=1) — you will enable strict type checking in a fileLocked
- 54LESSONLESSON 54: Your own my_filter — a higher-order filter with a callbackLocked
- 09QUIZQuiz 9: lessons 49–54Locked
- 55LESSONLESSON 55: Custom my_map — Mapping Elements While Keeping Functions PureLocked
- 56LESSONLESSON 56: Custom my_reduce — Reduce a Collection to a Single Value with Your Own ImplementationLocked
- 57LESSONLESSON 57: compose – Combining FunctionsLocked
- 58LESSONLESSON 58: pipe – Passing the Result AlongLocked
- 59LESSONLESSON 59: Generator: yield and return — you will create a generator with a termination conditionLocked
- 60LESSONLESSON 60: Generator for a multidimensional array — you will traverse nested structures lazilyLocked
- 10QUIZQuiz 10: lessons 55–60Locked
- 61LESSONLESSON 61: A custom iterator in PHPLocked
- 62LESSONLESSON 62: A custom aggregate (IteratorAggregate) in PHPLocked
- 63LESSONLESSON 63: Using foreach on a custom iteratorLocked
- 64LESSONLESSON 64: SPL: SplStack (stack) — you will use the LIFO structure in practiceLocked
- 65LESSONLESSON 65: SPL: SplQueue (queue) — you will implement FIFO with a ready-made classLocked
- 66LESSONLESSON 66: SPL: SplFixedArray — you will optimize a fixed-size arrayLocked
- 11QUIZQuiz 11: lessons 61–66Locked
- 67LESSONLESSON 67: Creating a Custom Exception in PHPLocked
- 68LESSONLESSON 68: Throwing and Catching a Custom ExceptionLocked
- 69LESSONLESSON 69: Nested try-catch in PHPLocked
- 70LESSONLESSON 70: finally – Cleanup Regardless of the OutcomeLocked
- 71LESSONLESSON 71: Regex: preg_match — you will match a pattern against textLocked
- 72LESSONLESSON 72: Regex: preg_replace — you will replace parts of text based on a patternLocked
- 12QUIZQuiz 12: lessons 67–72Locked
- 73LESSONLESSON 73: Regex: preg_replace_callback — function-driven text replacementLocked
- 74LESSONLESSON 74: Tests: a simple assert — a mini-infrastructure without a frameworkLocked
- 75LESSONLESSON 75: Exception tests — you will verify that code throws the expected errorsLocked
- 76LESSONLESSON 76: Refactoring: many ifs → matchLocked
- 77LESSONLESSON 77: Refactoring: extracting functions from procedural codeLocked
- 78LESSONLESSON 78: Short-circuit evaluation (&&, ||) — shortening evaluation in validationsLocked
- 13QUIZQuiz 13: lessons 73–78Locked
- 79LESSONLESSON 79: Lazy evaluation with a generator — processing a stream “on demand”Locked
- 80LESSONLESSON 80: References and copying – objects vs arraysLocked
- 81LESSONLESSON 81: Expressions and statements — values and controlling the program flowLocked
- 82LESSONLESSON 82: Task: a to-do list with OOP, exceptions, and filtersLocked
- 83LESSONLESSON 83: Final task: a transformation chain on an array of objectsLocked
- 14QUIZQuiz 14: lessons 79–83Locked
- +EXAMConfirm your skills with an examPreparing with this course is optional. You can choose a certification exam for this language and level without completing the course or quizzes. Check your account access and confirm exam authorization.Other status