Update test2.php

oops class implemented to display the result