sample php code with testing