Both Hamels and Astros pitcher Nelson Figueroa were less than satisfied with their performances. They used this game to help work on mistakes and make adjustments.
Hamels gave up five runs, three homers and seven hits over 3 2/3 innings.
Slugger Carlos Lee connected in the second. Homers by Chris Johnson and Jason Michaels chased Hamels in the fourth.
Figueroa, competing for the fifth spot in the rotation, allowed five runs, four earned, and six hits over four innings against his former team.
John Mayberry, Jr. and Ross Gload each had two hits and a run scored for the Phils who improved to 12-7 in spring training play.
Brad Lidge was supposed to pitch but was scratched last minute due to a sore arm. He will be pushed back for a few more days to recover, said General Manager Ruben Amaro, Jr.
Fan, follow and download: Get the latest from NBCPhiladelphia.com anytime, anywhere. Follow us on Twitter, Facebook and NBC Philadelphia. Sign up for our sports newsletter. And, get breaking news delivered right to your mobile phone -- just text PHIBREAKING to 639710 to sign up. (Message and data rates may apply.)