(a) Emancipation may occur by operation of law or pursuant to a petition filed with the court as provided in this article by a child who is at least 16 years of age.
(b) An emancipation occurs by operation of law:
(1) When a child is validly married;
(2) When a child reaches the age of 18 years; or
(3) During the period when a child is on active duty with the armed forces of the United States.
(c) An emancipation occurs by court order pursuant to a petition filed by a child with the juvenile court.