CHAPTER 5

image

Object Tools

As we have seen, PHP supports object-oriented programming through language constructs such as classes and methods. The language also provides wider support through functions and classes designed to help you work with objects.

In this chapter, we will look at some tools and techniques that you can use to organize, test, and manipulate objects and classes.

This chapter will cover

  • Packages: Organizing your code into logical categories
  • Namespaces: Since PHP 5.3 you can encapsulate your code elements in discrete compartments
  • Include paths: Setting central accessible locations for your library code
  • Class and object functions: ...

Get PHP Objects, Patterns, and Practice, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.