CHAPTER 3

image

Modular Programming

“Yes, I am a terrible coder, but I am probably still better than you :)”

—Rasmus Lerdorf

Chapter Objectives/Student Learning Outcomes

After completing this chapter, the student will be able to:

  • Create an error-free simple objected-oriented (OO) modular PHP program
  • Create a PHP class and make an instance of the class (object)
  • Create an OO PHP encapsulated program, including GET and SET methods
  • Create PHP methods (functions) that accept parameters and return information
  • Create PHP public and private properties (variables)
  • Import existing PHP code from another file or library into a program
  • Validate information received ...

Get Learn PHP 7: Object-Oriented Modular Programming using HTML5, CSS3, JavaScript, XML, JSON, and MySQL 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.