2. PHP Class Inheritance

This simple tutorial is for showing how class inheritance works in PHP and also provide a simple Object Oriented Programming (OOP) concept. To put things simply, class inheritance means a class can be inherited by a child class. A child class would inherit all the variables & functions the parent class has. Plus a child […]

1. PHP Class Introduction

I am going to show the simplest class in PHP. (See the embedded comments for detail. It’s very easy to understand.) This is the php class code (filename is contact_info.php) class contact_info { /* declare some class properties as variables */ var $name; var $phone_number; var $note;   /* Constructor is simply a function with […]