In PHP, a class constructor can not accept any parameter. Group of answer choices True False code example
Example 1: php constructor
__construct ([ mixed $args = "" [, $... ]] ) : void
Example 2: __construct
<?php
class BaseClass {
function __construct() {
print "In BaseClass constructor\n";
}
}
class SubClass extends BaseClass {
function __construct() {
parent::__construct();
print "In SubClass constructor\n";
}
}
class OtherSubClass extends BaseClass {
}
$obj = new BaseClass();
$obj = new SubClass();
$obj = new OtherSubClass();
?>