Sail E0 Webinar
Question
PHP recognizes constructors by the name.
Options:
A .  classname()
B .  _construct()
C .  function _construct()
D .  function __construct()
Answer: Option D


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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers