Journey
Learn PHP
A free, interactive online PHP course. You write PHP on every lesson — syntax, functions, arrays, forms, sessions, and the basics of building a dynamic website — with AI hints when something warns and a free certificate when you finish.
28,877+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction to PHP
5 lessons331- 01The PHP LanguageChallenge
- 02Hello World!ChallengeQuiz
- 03Tags and StatementsQuiz
- 04CommentsQuiz
- 05The new lineChallengeQuiz
Variables and Data Types
9 lessons663- 01NumbersChallengeQuiz
- 02Strings and QuotesChallengeQuiz
- 03BooleansQuiz
- 04Naming ConventionsQuiz
- 05Recap - Variable InitChallenge
- 06Empty VariablesQuiz
- 07String ConcatenationChallengeQuiz
- 08Getting User InputChallengeQuiz
- 09Cast to Different TypesChallengeQuiz
Basic Operators
8 lessons852- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Exponentiation OperatorChallengeQuiz
- 04Combined AssignmentChallengeQuiz
- 05Increment/DecrementChallengeQuiz
- 06Operator PrecedenceChallengeQuiz
- 07Recap - Simple CalculationsChallenge
- 08String OperatorsChallengeQuiz
Comparison & Logical Operators
5 lessons532- 01Comparison OperatorsChallengeQuiz
- 02Equality & IdentityChallengeQuiz
- 03Logical Operators Part 1ChallengeQuiz
- 04Logical Operators Part 2ChallengeQuiz
- 05Recap - Simple LogicChallenge
Conditional Logic
6 lessons639- 01If StatementChallengeQuiz
- 02If - ElseChallengeQuiz
- 03The Ternary OperatorChallengeQuiz
- 04Null Coalescing OperatorChallengeQuiz
- 05Switch StatementChallengeQuiz
- 06Recap - Making DecisionsChallenge
Arrays Part 1 - Indexed
7 lessons645- 01Introduction to ArraysQuiz
- 02Creating Indexed ArraysChallengeQuiz
- 03Accessing Elements by IndexChallengeQuiz
- 04Modifying Elements by IndexChallengeQuiz
- 05Array Size with CountChallengeQuiz
- 06Adding Elements to an ArrayChallengeQuiz
- 07Recap - Managing a Simple ListChallenge
Arrays Part 2 - Associative
6 lessons540- 01Intro to Associative ArraysQuiz
- 02Accessing Values by KeyChallengeQuiz
- 03Modifying Values by KeyChallengeQuiz
- 04Adding New Key-Value PairsChallengeQuiz
- 05Check if Key ExistsChallengeQuiz
- 06Recap - Key-Value Data StoreChallenge
Loops
7 lessons746- 01For LoopChallengeQuiz
- 02While LoopChallengeQuiz
- 03Foreach LoopChallengeQuiz
- 04Looping with Keys and ValuesChallengeQuiz
- 05Break StatementChallengeQuiz
- 06Continue StatementChallengeQuiz
- 07Recap - Iterating Over DataChallenge
Project: Simple To-Do List
Project7 lessons1- 01Project Overview & DataChallenge
- 02Adding a New TaskProject
- 03Displaying All TasksProject
- 04Marking a Task as CompleteProject
- 05Removing a TaskProject
- 06Filtering by Completion StatusProject
- 07Handling Empty List ScenariosProject
Functions
8 lessons857- 01Declaring & Calling FunctionsChallengeQuiz
- 02Function ParametersChallengeQuiz
- 03Returning ValuesChallengeQuiz
- 04Default Parameter ValuesChallengeQuiz
- 05Type Declarations for ParamsChallengeQuiz
- 06Return Type DeclarationsChallengeQuiz
- 07Variable ScopeChallengeQuiz
- 08Recap - Creating Reusable CodeChallenge
Final Challenges
3 lessons3- 01Challenge - Factorial CalcChallenge
- 02Challenge - Longest WordChallenge
- 03Challenge - Vowel CounterChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseDevelop problem-solving skills and create dynamic, interactive programsAdvanced Functions
9 lessons965- 01Anonymous FunctionsChallengeQuizAudio
- 02Closures and 'use'ChallengeQuizAudio
- 03Arrow FunctionsChallengeQuizAudio
- 04Callback FunctionsChallengeQuizAudio
- 05Using 'call_user_func'ChallengeQuizAudio
- 06Variable FunctionsChallengeQuiz
- 07Passing by ReferenceChallengeQuiz
- 08Recursive FunctionsChallengeQuiz
- 09Recap: Function MedleyChallenge
Advanced Array Manipulations
10 lessons1066- 01Adding with 'array_push'ChallengeQuiz
- 02Removing with 'array_pop'ChallengeQuiz
- 03Adding with 'array_unshift'ChallengeQuiz
- 04Removing with 'array_shift'ChallengeQuiz
- 05Merging Indexed ArraysChallengeQuiz
- 06Merging Associative ArraysChallengeQuiz
- 07Extracting with 'array_slice'ChallengeQuiz
- 08Values with 'in_array'ChallengeQuiz
- 09Keys with 'array_search'ChallengeQuiz
- 10Recap: Playlist ExerciseChallenge
Sorting Arrays
7 lessons747- 01Sort Indexed Arrays AscendingChallengeQuiz
- 02Sort Indexed Arrays DescendingChallengeQuiz
- 03Sort Assoc Arrays by ValueChallengeQuiz
- 04Sort Assoc Arrays by KeyChallengeQuiz
- 05Natural Order SortingChallengeQuiz
- 06Custom Sorting with 'usort'ChallengeQuiz
- 07Recap: Leaderboard SortingChallenge
Multi-dimensional Arrays
6 lessons639- 01Creating a 2D ArrayChallengeQuiz
- 02Accessing 2D Array ElementsChallengeQuiz
- 03Modifying 2D Array ElementsChallengeQuiz
- 04Iterating with Nested LoopsChallengeQuiz
- 052D Associative ArraysChallengeQuiz
- 06Recap: Simple Grid ExerciseChallenge
Student Gradebook
6 lessons6- 01Project Setup: Data StructureChallenge
- 02Adding a New StudentChallenge
- 03Adding a Grade to a StudentChallenge
- 04Calculating Student's AverageChallenge
- 05Finding the Top StudentChallenge
- 06Generating a Report CardChallenge
Higher-Order Array Functions
7 lessons745- 01Transforming with 'array_map'ChallengeQuiz
- 02'array_map' with Custom FuncChallengeQuiz
- 03Filtering with 'array_filter'ChallengeQuiz
- 04'array_filter' with Custom FunChallengeQuiz
- 05Reducing with 'array_reduce'ChallengeQuiz
- 06Walking with 'array_walk'ChallengeQuiz
- 07Recap: Data ProcessingChallenge
Working with Dates and Times
6 lessons539- 01The 'date()' FunctionQuiz
- 02Unix Timestamps with 'time()'ChallengeQuiz
- 03Intro to the DateTime ObjectChallengeQuiz
- 04Formatting DateTime ObjectsChallengeQuiz
- 05Modifying DateTime ObjectsChallengeQuiz
- 06Recap: Date CalculationsChallenge
Error and Exception Handling
7 lessons650- 01Understanding PHP ErrorsQuiz
- 02The 'try...catch' BlockChallengeQuiz
- 03The 'finally' BlockChallengeQuiz
- 04Throwing an ExceptionChallengeQuiz
- 05Creating a Custom ExceptionChallengeQuiz
- 06Using a Custom ExceptionChallengeQuiz
- 07Recap: Input ValidationChallenge
Event Scheduler
Project6 lessons1- 01Event DataChallenge
- 02Adding a New EventProject
- 03Listing Upcoming EventsProject
- 04Sorting Events by DateProject
- 05Filtering Events by MonthProject
- 06Displaying a CountdownProject
Final Challenges
4 lessons4- 01Challenge: Palindrome CheckerChallenge
- 02Challenge: Character FrequencyChallenge
- 03Challenge: Shopping Cart TotalChallenge
- 04Challenge: Unique Item FilterChallenge
Section 3
Object Oriented Programming
Start sectionStartExpandCollapseDiscover how to organize code with classes, objects, and reusable structuresFundamentals of OOP
9 lessons969- 01External FilesChallengeQuiz
- 02Introduction to OOPChallengeQuiz
- 03Classes vs ObjectsChallengeQuiz
- 04The $this KeywordChallengeQuiz
- 05MethodsChallengeQuiz
- 06PropertiesChallengeQuiz
- 07Constructor (__construct)ChallengeQuiz
- 08Destructor (__destruct)ChallengeQuiz
- 09Recap - Simple CalculatorChallenge
Namespaces & Autoloading
5 lessons534- 01Introduction to NamespacesChallengeQuiz
- 02The use KeywordChallengeQuiz
- 03PSR-4 Autoloading StandardChallengeQuiz
- 04Composer AutoloaderChallengeQuiz
- 05Recap - Organized ProjectChallenge
Class Properties
6 lessons644- 01Instance vs Static PropertiesChallengeQuiz
- 02Constants in ClassesChallengeQuiz
- 03Static Methods & PropertiesChallengeQuiz
- 04Private & Protected PropertiesChallengeQuiz
- 05Readonly Properties (PHP 8.1)ChallengeQuiz
- 06Recap - Bank Account ManagerChallenge
Inheritance
6 lessons644- 01Basic InheritanceChallengeQuiz
- 02The parent:: KeywordChallengeQuiz
- 03Method OverridingChallengeQuiz
- 04The final KeywordChallengeQuiz
- 05Abstract ClassesChallengeQuiz
- 06Recap - Employee HierarchyChallenge
Interfaces & Contracts
6 lessons645- 01Introduction to InterfacesChallengeQuiz
- 02Implementing InterfacesChallengeQuiz
- 03Multiple Interface ImplementChallengeQuiz
- 04Interface vs Abstract ClassChallengeQuiz
- 05Type Hinting with InterfacesChallengeQuiz
- 06Recap - Shape CalculatorChallenge
Polymorphism
5 lessons536- 01Method Overriding RevisitedChallengeQuiz
- 02Polymorphism via InterfacesChallengeQuiz
- 03Type Hinting & Union TypesChallengeQuiz
- 04Late Static BindingChallengeQuiz
- 05Recap - Payment ProcessorChallenge
Encapsulation
6 lessons645- 01Public, Protected, PrivateChallengeQuiz
- 02Access Modifiers in DepthChallengeQuiz
- 03Getters and SettersChallengeQuiz
- 04Information HidingChallengeQuiz
- 05Constructor Promotion (8.0)ChallengeQuiz
- 06Recap - Student Records SystemChallenge
Magic Methods
7 lessons753- 01Magic Methods IntroductionChallengeQuiz
- 02__toString & __debugInfoChallengeQuiz
- 03__get, __set, __isset, __unsetChallengeQuiz
- 04__call & __callStaticChallengeQuiz
- 05__clone & Object CloningChallengeQuiz
- 06__serialize & __unserializeChallengeQuiz
- 07Recap - Custom CollectionChallenge
Traits
5 lessons544- 01Introduction to TraitsChallengeQuiz
- 02Using Multiple TraitsChallengeQuiz
- 03Trait Conflict ResolutionChallengeQuiz
- 04Abstract Methods in TraitsChallengeQuiz
- 05Traits vs InheritanceChallengeQuiz
Advanced OOP Concepts
7 lessons761- 01Composition vs InheritanceChallengeQuiz
- 02Dependency InjectionChallengeQuiz
- 03Anonymous ClassesChallengeQuiz
- 04Enums (PHP 8.1)ChallengeQuiz
- 05Fibers (PHP 8.1)ChallengeQuiz
- 06Object Cloning Deep DiveChallengeQuiz
- 07Generators & IteratorsChallengeQuiz
Type System & Error Handling
7 lessons754- 01Type DeclarationsChallengeQuiz
- 02Nullable TypesChallengeQuiz
- 03Union & Intersection TypesChallengeQuiz
- 04Exception ClassesChallengeQuiz
- 05Custom Exception HierarchyChallengeQuiz
- 06Try, Catch, FinallyChallengeQuiz
- 07Recap - Form ValidatorChallenge
Design Patterns Part 1
5 lessons546- 01Intro to Design PatternsChallengeQuiz
- 02Singleton PatternChallengeQuiz
- 03Factory PatternChallengeQuiz
- 04Observer PatternChallengeQuiz
- 05Strategy PatternChallengeQuiz
Design Patterns Part 2
7 lessons764- 01Command PatternChallengeQuiz
- 02Adapter PatternChallengeQuiz
- 03Decorator PatternChallengeQuiz
- 04Template Method PatternChallengeQuiz
- 05State PatternChallengeQuiz
- 06Composite PatternChallengeQuiz
- 07Repository PatternChallengeQuiz
Project: Library Management
Project6 lessons1- 01Project OverviewChallenge
- 02Book and User ClassesProject
- 03Borrowing SystemProject
- 04Search FunctionalityProject
- 05Admin InterfaceProject
- 06Testing and IntegrationProject
Final Challenges
4 lessons4- 01E-Learning PlatformChallenge
- 02Banking SystemChallenge
- 03Game Character DevelopmentChallenge
- 04Vehicle Rental ServiceChallenge
Why learn PHP with Coddy
- Run real PHP code in your browser. No XAMPP, no Apache, no local server to configure. Each lesson runs your PHP server-side and shows the output instantly.
- PHP for the web the way it's actually used today: variables, control flow, functions, arrays, includes, forms, superglobals, sessions, and basic database patterns. The PHP foundations every web developer needs.
- AI hints help you debug PHP errors and untangle warnings without giving the answer away, so common issues like undefined indexes and quoting bugs become learning moments instead of dead ends.
- Free PHP certificate when you finish the course. A credible proof point for web-development, WordPress, and Laravel roles where PHP is still a baseline expectation.
Frequently asked questions about learning PHP
Is PHP hard to learn?
PHP is one of the easier languages to start with. The syntax is forgiving, you can mix it directly into HTML, and you see results in the browser immediately. Most beginners build a working PHP page within the first hour. The trickier parts (security, sessions, working with databases) come later and are introduced gradually.
Is PHP still worth learning in 2026?
Yes. PHP still powers a large share of the web — WordPress alone runs roughly 40% of all sites, and frameworks like Laravel and Symfony are healthy and active. For WordPress development, agency-style web work, or any backend that talks to MySQL, PHP is a very practical skill.
How long does it take to learn PHP?
PHP basics — variables, conditionals, loops, functions, arrays — take one to two weeks of daily practice. Building a small dynamic site with forms, sessions, and database queries usually takes one to three months on top of that. Going deeper into Laravel or WordPress development is a separate ramp.
What's the difference between PHP and HTML?
HTML is the markup language that describes the structure of a web page. PHP is a programming language that runs on the server and generates HTML before it reaches the browser — that's how you produce dynamic pages, log users in, save form data, and so on. They work together: HTML for layout, PHP for logic.
Can I learn PHP online for free?
Yes. The interactive PHP course is free — lessons, coding exercises, quizzes, and a certificate. PHP runs server-side in a sandboxed environment, so you don't need to install Apache, MySQL, or XAMPP locally to start coding.
Do I get a PHP certificate after the course?
Yes. Finishing the PHP course gives you a free certificate of completion you can add to your resume or share on LinkedIn — useful alongside WordPress sites, Laravel apps, or any portfolio web projects you've built.