Answers for "setup the parent constructor in phpp"

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

Code answers related to "setup the parent constructor in phpp"

Browse Popular Code Answers by Language