<?php
class Example
{
function __construct() //default constructor
{
echo "Constructor calling first";
}
function print() //default function with no arguement.
{
echo "Function calling second";
}
function __destruct()
{
echo "destructor calling last";
}
}
$ex= new Example();
ex->print();
?>