an example of a class in php

This is a basic example of a class in php.

<html>
<body>
<?php
class firstclass
{
function sayHello()
{
print"Hello world";
}
function sayGoodbye()
{
print"Goodbye";
}

}
?>
<?php
$obj = new firstclass();
$obj->sayhello();
$obj->sayGoodbye();
?>
</body>
</html>