Opinion by
Keller, J.,This appeal is from the judgment of the court below on a case stated. It has to do with the construction of the School Code (Act of May 18, 1911, P. L. 309), and especially with sections 1401,1402 and 1412 (as amended by the Act of May 6,1913, P. L. 192).
These sections are as follows: “Section 1401. Every child, being a resident of any school district in this Commonwealth, between the ages of six and twenty-one years, may attend the public schools in his district, subject to the provisions of this act.”
“Section 1402. A child shall be considered a resident of the school district in which his parents or the guardian of his person resides. If any child has no parents or guardian of his person, then such child shall be considered a resident of the district in which the person sustaining parental relations to such child resides.”
“Section 1412. The board of school directors of any school district in this Commpnwealth, in which there is located any orphan asylum, h'ome for the friendless, *78children’s home, or other institution for the care or training of orphans or other children, shall permit any children who are inmates of such homes, but not legal residents in such district, to attend the public schools in said district, either with or without charge for tuition, textbooks, or school supplies as the directors of the district in which said institution is located may determine: Provided, That when the education of such inmates of such institutions is charged for, the cost thereof shall not exceed the cost of tuition, textbooks, and school supplies of other children of similar grade in such district: And, provided further, That such cost shall be paid to the district in which such institution is located by the district of which the respective pupils are legal residents.”
It will be noted that the terms, “resident” and “legal resident,” as they appear in these sections are used in connection with the children, not their parents or guardians. The child may attend school in the district of which he is a resident. He is to be considered a resident of the school district in which his parents, or those sustaining parental relations to him, reside — not have their domicile or legal residence, — and if any child is an inmate of an orphans’ home, but not a legal resident in such district, he shall be permitted to attend school in said district and the cost of his tuition, etc., shall be paid by the district of which he — not his parent or guardian — is a legal resident.
Our Supreme Court has pointed out in the case of Raymond v. Leishman, 243 Pa. 64, that the terms “residence” and “domicile” are not convertible terms and not always equivalent; that “residence” is a word whose statutory meaning depends upon the legislative purpose as well as the context of the statute.
It is evident that by the words “legal residents,” as employed in section 1412 supra in connection with children of school age, the legislature did not have in mind the domicile or legal residence where a man’s political *79rights are to be exercised and where he is liable to taxation, as suggested by the appellant, for children have no vote and are not taxed; their right to attend school in a district is not dependent on their parents’ or guardian’s right to vote therein, or being taxed therein, or having acquired a legal settlement there, but only on their residing there.
The purpose at the base of our common school laws is to provide all children residing within the Commonwealth with a good common school education. In carrying out this purpose the various school districts are merely the agents of the Commonwealth: Ford v. School District, 121 Pa. 543; Gettysburg v. School District, 50 Pa. Superior Ct. 87. In construing the school laws, therefore, that interpretation will be adopted which will be more likely to carry into effect this generous purpose. The child is the paramount object of our common school law. His education, and not the exact apportionment of its cost among various subdivisions of the Commonwealth, is its chief concern. Hence a child whose parents reside in a district may go to school there, whether or not his parents are legally domiciled there, are entitled to vote there, or are taxed there, and the cost thereof may not be shifted to the district of his parents’ domicile. The law applicable to settlements in poor districts has no place here. A man does not acquire a new settlement, for the purpose of securing relief, etc., until after he has continued to reside therein for one year or complied with the other requirements of the Acts of April 6, 1905, P. L. 112, or June 13, 1836, P. L. 539, but his children may attend school in the new district from the first day of his residence therein, without recoupment to the district from any source. A state official, who lives in Harrisburg, while employed in the service of the State is not deemed to have gained a residence' there for the purpose of voting (Constitution, article VIII, section 13), but his children may attend school there while he is actually residing with his family *80in said city. The children of an alien residing in this State may attend school here, no matter whether they were born here or abroad and notwithstanding he maintains his domicile in such foreign country.
We are satisfied that the word “resident” as used in sections 1401 and 1402, as well as the word “residing” in section 401, which imposes on school directors the duty of establishing and maintaining a sufficient number of elementary public schools to educate every person between the ages of six and twenty-one years, residing in such district, who may attend, refers to those living or dwelling or abiding in said district and is not confined to those whose parents or guardians are domiciled therein or have acquired a legal residence therein for voting or taxing purposes.
The use of the word “legal” in connection with “resident” in section 1412 does not change this construction. As before pointed out, the tuition, etc., is chargeable to the district of which the child is a legal resident. The word “legal” is not thus used in order to limit the residence, as theretofore explained, to “domicile,” but rather means a resident as previously defined in section 1402 of the act. One so resident is a legal resident for the purposes of the code. The term is so used in section 1414 providing for compulsory attendance and its enforcement : “Every child having a legal residence in this Commonwealth, as herein provided,......is required to attend a day school......” etc., which is applicable to every child within the prescribed ages, living or abiding, as distinguished from merely sojourning, within the district whether his parents are domiciled therein or not.
As it appears from the case stated that Mrs. Schultz, from February 6, 1913, to June 23, 1917, lived in Wil-Mnsburg, where she was working as a domestic, we are of opinion that she was for the purposes of the School Code a resident of Wilkinsburg during that time; that had her children lived with her instead of at the Odd Fellows’ Home they would have been entitled to attend *81school there under sections 1401 and 1402 of the Code and their mother could have been compelled to send them there under section 1414; that this is not affected by the fact that she had in mind that at some future time she might or would return to Pittsburgh. As was said by the court below: “We are not allowed to speculate as to what Mrs. Schultz might have done or might have had in her mind. We must consider alone what she did. She gave up her residence in Pittsburgh and went to Wilkinsburg, where she lived not for a few weeks, but for over four years. She had no other residence anywhere during that period, in contemplation of the School Code.”
It follows that the court below committed no error in holding that the School District of Pittsburgh was not responsible for the cost of the children’s tuition, etc., during that period and that the School District of Wilkinsburg was.
The judgment is affirmed; costs on this appeal to be paid by the appellant.