Under the immigration rules a child who has spent seven years in the UK before their 18th birthday could acquire a right of residence in the UK, along with their parents and siblings. The legal test is reasonableness: i.e. that it would not be reasonable to expect the child to leave the UK.
We recently had a case where a child had only been resident in the UK for 6 years along with her mother and a younger brother of four. The mother had, what the Home Office would consider to be, a poor immigration history, however, we were able to obtain immigration status for the whole family despite the family not having lived in the UK for 7 years. We succeeded in this application by establishing that the child was very much integrated into the life and culture of the UK.
In our application, we also reminded the Home Office that the children should not be punished for the sins of their mother and her allegedly poor immigration history, which was the position endorsed by the Supreme Court in a recent case of KO (Nigeria) v SSHD  UKSC 53.
The Home Office accepted our representations and we were able to secure immigration status for this family at the initial application stage and without having to appeal.
Please contact the immigration department if you find yourself in a similar situation and require our assistance in regularising your status. Or, view our page on international children law.