Answers for "php how to use parent constructor"

PHP
1

php call parent constructor

<?php
class BaseClass {
   function __construct() {
       print "En el constructor BaseClass\n";
   }
}

class SubClass extends BaseClass {
   function __construct() {
       parent::__construct();
       print "En el constructor SubClass\n";
   }
}
Posted by: Guest on April-12-2021
0

php extend parent constructor

parent::__construct();
Posted by: Guest on July-31-2021

Code answers related to "php how to use parent constructor"

Browse Popular Code Answers by Language