Calling constructor in the main class from the extended or derived class.

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Parent key word to use </title>
</head>

<body text="#FFFF00" bgcolor="#000080">
<?php
class Club
{
protected $name;
protected $title;

function __construct()
{
echo "<p>Club constructor called!</p>";
}
function add($x)
{
$y = $x + 12 ;
print(" Receive a bonus $y ");
return $y;
}
}

class players extends Club
{
function __construct()
{
parent::__construct();
echo "<p>players constructor called!</p>";
}
}
//create an instance of the extended class.
$np = new players();
$np->add(15);

?>
<body></html>