Related Rule
Philippines
Practice Relating to Rule 99. Deprivation of Liberty
Section E. Decision on the lawfulness of deprivation of liberty
The Philippines’ Republic Act No. 9344 (2006), the Juvenile Justice and Welfare Act of 2006, provides:
Sec. 5. Rights of the Child in Conflict with the Law. – Every child in conflict with the law shall have the following rights, including but not limited to:
(e) … the right to challenge the legality of the deprivation of his/her liberty before a court or other competent, independent and impartial authority, and to a prompt decision on such action. 
Philippines, Republic Act No. 9344, 2006, Section 5(e).
In its judgment in the Alejano case in 2005, the Supreme Court of the Philippines stated:
The remedy of habeas corpus has one objective: to inquire into the cause of detention of a person. The purpose of the writ is to determine whether a person is being illegally deprived of his liberty. If the inquiry reveals that the detention is illegal, the court orders the release of the person. If, however, the detention is proven lawful, then the habeas corpus proceedings terminate. The use of habeas corpus is thus very limited. It is not a writ of error. Neither can it substitute for an appeal. 
Philippines, Supreme Court, Alejano case, Judgment, 25 August 2005.
A 1998 memorandum by the President of the Philippines, addressed to the Philippine Secretary of Justice, the Solicitor General and the Presidential Chief Legal Counsel, provides:
Pursuant to the 50th Anniversary Celebration of the Universal Declaration on Human Rights, you are hereby directed to jointly undertake the following activities:
1. Review all laws, decrees and executive issuances deemed repressive and ensure that all rights guaranteed in the Philippine Constitution are upheld, promoted and protected.
2. Review the Jurisprudence so that those judicial decisions and procedures not compatible with the standards of human rights and dignity can be brought to the attention of the Supreme Court, in particular, cases of warrantless arrests … and the circumvention of Habeas Corpus proceedings, among others. 
Philippines, President of the Republic of the Philippines, Memorandum, Review of Laws and Jurisprudence to Ensure Protection and Promotion of Human Rights, 10 December 1998.