Call parent constructor before child constructor in PHP

Just call parent::__construct in the child.

class Form extends Tag
{
    function __construct()
    {
        parent::__construct();
        // Called second.
    }
}

Leave a Comment