By itself, corporal punishment is NOT at all illegal in the Philippines. The right and duty of those with parental authority over children "to impose discipline on them as may be required under the circumstances" is recognized in the Family Code (Art. 20). The Child and Youth Welfare Code recognized as well the right of parents "to discipline the child as may be necessary for the formation of his good character" (Art. 45).
Even the Code of Muslim Personal Laws states that in relation to their children parents have "the power to correct, discipline, and punish them moderately" (Art. 74). The Rules and Regulations on the Reporting and Investigation of Child Abuse Cases, approved October 11, 1993, states that "discipline administered by a parent or legal guardian to a child does not constitute cruelty provided it is reasonable in manner and moderate in degree and does not constitute physical or psychological injury".
In schools, however, corporal punishment is prohibited (Art. 233, Family Code). This is true for public schools, according to the 1992 DECS Service Manual (sorry, I can't cite you the exact article/section as I don't have a copy with me right now), as well as in the 1992 Manual of Regulations for Private Schools, Art. XIV, Sec. 75. (Note: There seems to be an updated copy of this 1992 Manual, but I don't have that one yet, nor have I confirmed its actual existence.)
However, corporal punishment does not seem to include community service. According to the Revised Rule on Children in Conflict with the Law, A.M. No. 02-1-18-SC, issued November 24, 2009, "[c]orporal punishment is any kind of physical punishment inflicted on the body as distinguished from pecuniary punishment or fine."
Further notes:
1. There is a 2000 DepEd Service Manual, which, according to DepEd Memo No. 297, s. 2006, "are replete with provisions on the proper treatment of pupils/students and their rights which must be respected."
2. Here's a good article re corporal punishment in the Philippines:
http://www.endcorporalpunishment.org/pag...e_a-d.html