Here’s an excellent tutorial that introduces the concept of Object Oriented Programming (OOP) in PHP. It is written lucidly but may be a little confusing if you don’t already have some basic familiarity with the PHP language.
Here’s another tutorial if you find that one a bit much.
Setting and Outputting a Class Property
public $prop1 = "I'm a class property!";
$obj = new MyClass;
echo $obj->prop1; // Output the property
This article by author Matt Weisfeld brings up an important subject that will no doubt become more relevant as the public becomes more familiar with “The Internet of Things“. Matt points out that the conceptualization inherent with Object Oriented Programming is what makes IoT possible.
“It can safely be said that the object has been the driving force in the programming industry for a very long time and will continue to be so for the foreseeable future. The evidence to support this statement is pretty compelling! Today, just about every major software development methodology is based on objects. As a result, virtually all programming languages, scripting languages and application designs are object-oriented or object-based.”