Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Tell me how to call a constructor for a parent class?



Tell me how to call a constructor for a parent class?..

Answer / Jayant Singh Rathore

In PHP, you cannot explicitly call the parent constructor. However, if you don't provide a constructor in your child class, PHP will automatically call the parent class's constructor by default. If you want to call the parent constructor explicitly, you can do so using the parent keyword inside the child class's constructor: public function __construct() { parent::__construct(); }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WordPress Interview Questions

Is there any other CMS better WordPress?

1 Answers  


How can I check a website is safe?

1 Answers  


How many hours does it take to create a website?

1 Answers  


What's the difference between categories and tags in wordpress?

1 Answers  


What are wordpress site pages?

1 Answers  


How do I change my theme?

1 Answers  


Why add_action() function not work in member function in wordpress?

1 Answers  


How do I make a static page in wordpress?

1 Answers  


Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

1 Answers  


Why wordpress is better than blogger for blogging?

1 Answers  


What is wordpress used for?

1 Answers  


How to update a wordpress site?

1 Answers  


Categories