Object-oriented programming in PHP

PHP OOP

Introduction to object-oriented programming in PHP

Lesson 1 - Introduction to object-oriented programming in PHP

In this course, we'll go into the whys and hows of object-oriented programming. We'll list the advantages of OOP's and get familiar with working with it.
Free Unrated Written by David Capka
First object-oriented application in PHP

Lesson 2 - First object-oriented application in PHP

In this lesson, we'll go over how OOP works and create our first object-oriented application in PHP.
Free Unrated Written by David Capka
Attributes and magic methods in PHP

Lesson 3 - Attributes and magic methods in PHP

In this lesson, we'll add attributes to our objects and introduce you to the 3 main magic methods: constructor, destructor, and toString.
Free Unrated Written by David Capka
Exercises for OOP in PHP lessons 1-3

Exercises for OOP in PHP lessons 1-3

Solved programmer tasks in PHP on classes, attributes, methods, and constructors. Tasks are ordered by difficulty. Solutions available for download.
Premium Unrated Written by David Capka
Encapsulation in PHP

Lesson 4 - Encapsulation in PHP

In this lesson, we'll explain the principle of encapsulation in PHP, add private attributes to our class, and program a sleeping mechanism for our humans.
Free Unrated Written by David Capka
Making an object-oriented component in PHP - Image Gallery

Lesson 5 - Making an object-oriented component in PHP - Image Gallery

In this lesson, we're going to create our very first object-oriented component in PHP - an Image gallery.
Free Unrated Written by David Capka
Reference and primitive data types in PHP

Lesson 6 - Reference and primitive data types in PHP

After this lesson, you'll understand how PHP handles reference data types (objects) and how they differ from the primitive ones.
Free Unrated Written by David Capka
Exercises for OOP in PHP lessons 4-6

Exercises for OOP in PHP lessons 4-6

Solved programmer tasks in PHP on topics encapsulation, files and folders, references. Tasks are ordered by difficulty. Solutions available for download.
Premium Unrated Written by David Capka
Inheritance in PHP

Lesson 7 - Inheritance in PHP

In this lesson, you'll learn how inheritance works in PHP. We'll call a parent constructor, introduce you to the protected modifier and extend our objects.
Free Unrated Written by David Capka
Polymorphism, final attributes and autoloader in PHP

Lesson 8 - Polymorphism, final attributes and autoloader in PHP

In the lesson, we'll go even deeper into object-oriented programming. We'll go over polymorphism, method overriding, final attributes, and autoloader.
Free 55555 Written by David Capka
Exercises for OOP in PHP lessons 7-8

Exercises for OOP in PHP lessons 7-8

Solved programmer tasks in PHP on inheritance and polymorphism. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka
Static class members in PHP

Lesson 9 - Static class members in PHP

In object-oriented lesson, we'll introduce you to static class members in PHP, which are an important part of most applications.
Free Unrated Written by David Capka
Static class members in PHP pt. 2 - constants

Lesson 10 - Static class members in PHP pt. 2 - constants

In this object-oriented programming lesson, we'll continue working with static class members in PHP, and learn to declare constants.
Free Unrated Written by David Capka
Static class members in PHP pt. 3 - do's and don'ts

Lesson 11 - Static class members in PHP pt. 3 - do's and don'ts

In this lesson, we'll wrap up with static members in PHP. We'll go over static registers, database wrappers and consider when to use static members.
Free Unrated Written by David Capka
Exercises for OOP in PHP lessons 9-11

Exercises for OOP in PHP lessons 9-11

Solved programmer tasks in PHP on static class members and constants. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka
Object-oriented hit counter in PHP and PDO

Lesson 12 - Object-oriented hit counter in PHP and PDO

In the lesson, we'll program an object-oriented hit counter in PHP using the PDO database driver and static database wrapper.
Free Unrated Written by David Capka
Object-oriented hit counter in PHP - continuation

Lesson 13 - Object-oriented hit counter in PHP - continuation

In the lesson, we'll finish up with our PHP hit counter using the PDO database driver and static database wrapper.
Free Unrated Written by David Capka
Exercises for OOP in PHP lessons 12-13

Exercises for OOP in PHP lessons 12-13

Solved programmer tasks in PHP on databases and PDO. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka
Interfaces in PHP

Lesson 14 - Interfaces in PHP

In this object-oriented programming lesson, we'll teach you how to use interfaces and the instanceof operator.
Free Unrated Written by David Capka
Interfaces and abstract classes in PHP

Lesson 15 - Interfaces and abstract classes in PHP

In this lesson, we'll keep going with interfaces as well as introduce you to abstract classes. You'll learn to implement and delegate interfaces.
Premium Unrated Written by David Capka
Putting PHP interfaces into practice - GuestBook

Lesson 16 - Putting PHP interfaces into practice - GuestBook

In this lesson, we'll put our knowledge of OOP in PHP to the test by using interfaces to create a guestbook and modular captchas.
Premium Unrated Written by David Capka
Guestbook in PHP - continuation

Lesson 17 - Guestbook in PHP - continuation

In this lesson, we're going to finish our PHP guestbook and change it's captcha implementation to image-based responses using our modular interface.
Premium Unrated Written by David Capka
Exceptions in PHP

Lesson 18 - Exceptions in PHP

In this tutorial, we're going to cover what exceptions are in OOP. We'll show you how try-catch blocks work and how exceptions make PHP apps more readable.
Premium Unrated Written by David Capka
Exceptions in PHP pt. 2

Lesson 19 - Exceptions in PHP pt. 2

In tutorial, we'll explain the relationship between exceptions and OOP design, the types of built-in PHP exceptions, and how to react to exceptions.
Premium Unrated Written by David Capka
Custom exceptions in PHP, propagation and the finally block

Lesson 20 - Custom exceptions in PHP, propagation and the finally block

In this tutorial we're going to create our own exceptions, we'll explain propagation of exceptions and finally block.
Premium Unrated Written by David Capka
Practicing PHP exceptions - Finishing the contact form

Lesson 21 - Practicing PHP exceptions - Finishing the contact form

In the tutorial, we're going to finish our contact e-mail form in PHP using OOP using exceptions to handle user errors and finish up with exceptions.
Premium Unrated Written by David Capka
Exercises for OOP in PHP lessons 14-21

Exercises for OOP in PHP lessons 14-21

Solved programmer tasks in PHP on interfaces, abstract classes, and exceptions. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka
Magic methods in PHP pt. 2

Lesson 22 - Magic methods in PHP pt. 2

In this tutorial about object-oriented programming in PHP, we're going to go over some more magic methods. Mainly, about getters and setters.
Premium Unrated Written by David Capka
Date and Time in PHP using OOP

Lesson 23 - Date and Time in PHP using OOP

In this tutorial, we're going work with date and time in an object-oriented way using the DateTime and DateInterval PHP classes. We'll also format dates.
Premium Unrated Written by David Capka
Exercises for OOP in PHP lessons 22-23

Exercises for OOP in PHP lessons 22-23

Solved programmer tasks in PHP on date, time and magic methods. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka
ArrayAccess and cloning in PHP

Lesson 24 - ArrayAccess and cloning in PHP

In this tutorial, we're going to treat objects like arrays by implementing the ArrayAccess interface. We'll also teach you how to clone objects.
Premium Unrated Written by David Capka
Namespaces in PHP

Lesson 25 - Namespaces in PHP

In this tutorial, we're going to teach you how to use namespaces to make big projects more readable. We'll show you importing, aliases, and autoloading.
Premium Unrated Written by David Capka
TypeHinting and documentation in PHP

Lesson 26 - TypeHinting and documentation in PHP

In the final tutorial, we're going to show you how to automatically check data types using TypeHinting, and learn how to document projects properly.
Premium Unrated Written by David Capka
Exercises for OOP in PHP lessons 24-26

Exercises for OOP in PHP lessons 24-26

Solved programmer tasks in PHP on cloning, namespaces and documentation. Tasks are ordered by difficulty. Solutions are available for download.
Premium Unrated Written by David Capka