Pregunta de entrevista de V2Solutions

What is Constructor & Ho w We Implement It

Respuesta de la entrevista

Anónimo

28 abr 2017

A constructor is special functions which are automatically called when an object is created. The constructor is the most useful because it allows you to send parameters along when creating a new object, which can then be used to initialize variables on the object. class TestClass { function __construct() { print "constructor\n"; } }