Class in Oops

Oops stands for Object Oriented Programming, In PHP it takes a major role in building a robust application. Not only PHP other languages like .Net, C#, JAVA, Python, etc. Oops, the concept takes a vital role to develop giant and secure applications or Mobiles apps, etc.



Class Concept in Opps – PHP

What is Class in Oops:-

A class is the blueprint of objects, or, we can say a data type that contains properties and methods.

Here is the below example, so you can have a clear idea about the class in PHP. In this example Car is the class name, and Price, Color, Brand are the member variable or properties, and setprice()getprice()setColor()getColor(), setBrand(), getBrand() are the Member functions or  methods.

 

Class Concept in Oops-PHP



Questions Asked In Interview About Class in Oops

  1. How many objects can Create in a Class
  2. What is a Class in PHP
  3. What is the Use of a Class in PHP
  4. What is an Abstract Class

 



Tags: ,