WBP All Questions Answers
WBP All Questions Answers
2 Marks Questions
A concrete class is a class that has complete implementation and can be instantiated to create objects. Unlike abstract
An abstract class is a class that cannot be instantiated. It may contain abstract methods which do not have any
Example:
Introspection in PHP refers to the ability to examine classes, interfaces, properties, and methods at runtime using
Serialization is the process of converting a PHP object or value into a storable string format that can be saved or
transferred.
$serializedData = serialize($object);
4 Marks Questions
1. Describe parameterized constructor with suitable example.
class Student {
public $name;
function __construct($name) {
$this->name = $name;
|---------------|--------------------------------|-----------------------------------------|
| Definition | Same method, different params | Redefines parent method in child class |
|------------------|----------------------------|-------------------------------|