Creating a Class Object with PHP 5

-

Introduction

In this tutorial I will show you how to create a PHP object. 

 

How to Instantiate a PHP Object

Take the code below: 

<?php
  class WebDeveloper {
    public $name;
    public function __construct($name) {
      $this->name = $name
    }
  }
?>

To make an object we have to save the instance of the class into a PHP variable

<?php
  $developer = new WebDeveloper('jordizle');
?>

Your comments.