brianlange Posted August 29, 2010 Share Posted August 29, 2010 I am working with the Zend Framework and I noticed that some of the classes do not have constructor. For instance, Zend_ACL does not have a constructor. What happens with this class is instantiated? Is it just a sort of empty object? The class does not extend another class so a parent constructor is not being called. Link to comment https://forums.phpfreaks.com/topic/211989-php-classes-without-constructors/ Share on other sites More sharing options...
Alex Posted August 29, 2010 Share Posted August 29, 2010 Having no defined constructor is the same as having an empty constructor. public function __construct() { } These objects obviously don't require anything to be done upon instantiation. Link to comment https://forums.phpfreaks.com/topic/211989-php-classes-without-constructors/#findComment-1104803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.