Basic Terminology of OOPS 



<?php


Basic Terminology:
  ~~~~~~~~~~~~~~~~~~~~~
 1.Instance Variable: class level elements or variables
    1. All the variables defined inside class but outside the method
    2. All the variables wrapped inside class
    3. All the variables encapsulated(covered) inside a class
 
 2. local variables:
    1. Any variable outside the class
    2. Any Variable inside the class but inside the method

 3. Method: Any function declayred inside the class is nothing but method
    1. All functions defines inside class
    2. All function wrapped inside class
    3. All function Encapsulated Inside class

Class = variables + functions()
  or
Class = instance variable + methods()
  or
Multiplying By wrapping both side
wrapping(class)=wrapping(instance variable) + wrapping(methods)
wrapping(class)=wrapping(variables) + wrapping(function())

but wrapping = Enscapsulation
Enscapsulation(class) = wrapping(variable)+ wrapping(function())
Enscapsulation(class) = wrapping(Instance variable)+ wrapping(methods())

or 
In General
Class is a Encapsulated version of variables and functions
variable defines properties
functions defines behaviour

class = collection of properties + behaviour
      = collection of states(attributes) + behaviour(actions())
      For Ex.
      class Student{
         public $name;
         public $roll;
         public $class;
         
         public function scoreMarks(){
         
         }
         public function sayName(){
         
         }
         
         public function willstudy(){
         
         }
      
      }


Basic Terminology


Example -