corrected test() method in php