Examveda
Examveda

PHP recognizes constructors by the name_________

A. classname()

B. _construct()

C. function _construct()

D. function __construct()

Answer: Option D

Solution(By Examveda Team)

A double underscore followed by the construct keyword. Its syntax is function __construct ([ argument1, argument2,…..]) { Class Initialization code }.

This Question Belongs to PHP >> Object Oriented Concept

Join The Discussion

Related Questions on Object Oriented Concept