Comments on Profile Post by mba2012

  1. shavingfoam
    shavingfoam
    When you create a class, you create "instances" or "objects" of the class. Each object has the same number of variables and each variable is named the same, but they have different data.
    Mar 18, 2013
  2. shavingfoam
    shavingfoam
    For example, all cars have a color, a model, and a certain number of seats, but each car differs in these characteristics. One car may be red, another may be blue, but they all have a color. The "idea" of a car would be the class, and each individual car would be an object or instance of the class.

    This is called Object-Oriented Programming. It's not unique to PHP. Many languages use this.
    Mar 18, 2013
  3. mba2012
    mba2012
    Ok. Thanks. I am trying to grasp the basics as they are used in XenForo. A lot.
    Mar 18, 2013
  4. shavingfoam
    shavingfoam
    Classes are really helpful. PHP didn't add them until version 4, so it's possible to program in PHP without using a single class.
    Mar 19, 2013