Skip to content

Tag Archives: PHP-OOP

The get_object_vars() function is an inbuilt function in PHP which is used to get the properties of the given object. When an object is made,… Read More
In the PHP each and every property of a class in must have one of three visibility levels, known as public, private, and protected. Public:… Read More
The class_exists() function is an inbuilt function in PHP which is used to check whether the given class is defined or not. Syntax: bool class_exists(… Read More
The get_called_class() function is an inbuilt function in PHP which is used to get the class name where the static method is called. Syntax: string… Read More
The get_class() function is an inbuilt function in PHP which is used to return the class name of an object. Syntax: string get_class( object $object… Read More
The get_class_methods() function is an inbuilt function in PHP which is used to get the class method names. Syntax: array get_class_methods( mixed $class_name ) Parameters:… Read More
The class_alias() function is an inbuilt function in PHP which is used to create an alias name of the class. The functionality of the aliased… Read More
An Interface allows users to create programs specifying the public methods that a class must implement, without involving the complexities and details of how the… Read More
In today’s technical world, maintaining privacy has become one of the demanding needs for the protection of important data. Whenever data modified in one function… Read More
Constructors are special member functions for initial settings of newly created object instances from a class, which is the key part of the object-oriented concept… Read More
Multiple Inheritance is the property of the Object Oriented Programming languages in which child class or sub class can inherit the properties of the multiple… Read More
Given a PHP class object and the task is to convert or cast this object into object of another class. Approach 1: Objects which are… Read More
Given two objects of same class and the task is to merge both objects into single object. Approach 1: Convert object into data array and… Read More
Abstract classes are the classes in which at least one method is abstract. Unlike C++ abstract classes in PHP are declared with the help of… Read More
Final keyword in PHP is used in different context. The final keyword is used only for methods and classes. Final methods: When a method is… Read More