Connect with Facebook

Tutorials

Popular Tutorials (5)

Web Development (4)

2D Graphics (3)

Database (1)

Affiliates

Newest Submissions

3Votes
Classes - Learn Advanced Object Oriented Programming for PHP What are classes, you ask? Classes are object-oriented programming for PHP. What is object-oriented programming? Object-oriented programming consists of three main vocabulary words: classes, methods, and objects. An object is basically a data structure (also known as an abstract data type), which are encapsulated in a set of routines known as methods. A class is a collection of methods and objects. What's the purpose of classes in PHP? It's the same reason as any other programming language: for large projects, classes provide superior organization and less repetitive code. "So, how do we do it?" you ask? I'll show one of the most basic classes and then explain it line-by-line.

Advertise