OOP in PHP

Tutorials in object orientated PHP are gathered in this category.

  1. Learn about the difference between arrays and objects, and why objects are more powerful than arrays.
  2. We can prevent adding properties to instantiated objects in PHP to help enforce good coding practice; in this tutorial I show how this is accomplished.
  3. We can access other classes properties (variables) and methods (functions) by injecting the class object in the class that needs it.
  4. Auto instantiating objects created by factory classes.
  5. Learn what PHP objects are, and how to use them in your own PHP coding adventures.
  6. When does extending classes have a useful purpose? Find out more in this article.
  7. Learn about Namespaces in PHP, and when you should be using them. A greatly simplified tutorial for OOP beginners.
  8. About using PHP traits to re-use code and follow the DRY principle.
  9. How to extend classes in PHP, and how to use object inheritance.
  10. An Explanation on Properties and Methods in PHP.

Object Orientated PHP Tutorials

This category contain tutorials on various subjects relating to object orientated PHP.