create a greeting method of a class in php

Just a piece of intersting code sample from code Academy php track for further use and experimentation.