Answers for "php parent constructor called automatically"

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 "php parent constructor called automatically"

Browse Popular Code Answers by Language