O'Reilly logo

PHP, MySQL, & JavaScript All-in-One For Dummies by Richard Blum

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Object-Oriented PHP Programming

IN THIS CHAPTER

check Defining object-oriented programming

check Creating objects

check Using objects

check Customizing objects

So far, all the PHP scripts presented in this minibook have followed the procedural style of programming. With procedural programming, you create variables and functions within your code to perform certain procedures, such as storing values in variables, and then checking them with conditional statements. The data you use and the functions you create are completely separate entities, with no specific relationship to one another. With object-oriented programming, on the other hand, variables and functions are grouped into common objects that you can use in any program. In this chapter, you learn what object-oriented programming is and how to use it in your web applications.

Understanding the Basics of Object-Oriented Programming

Before you can start working on object-oriented programming (OOP), you need to know how it works. OOP uses a completely different paradigm from coding than what I cover earlier in this minibook. OOP requires that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required