— By “An act for the protection of the traveling public against accidents caused by color blindness and defective vision,” approved February 28, 1887, all persons affected with color blindness and loss of visual power, one or both, to the. extent defined in the requirements of the act, *275are disqualified from serving on railroad lines within this State in the capacity of locomotive engineer, fireman, train conductor, station agent, switchman, flagman, gate-tender, signal-man, or in any other position which requires the use or discrimination of form or color signals; and for any person to serve in any of the capacities mentioned, without having first obtained a certificate of fitness for his position, in accordance with the provisions of the act, is made a misdemeanor. Examinations and re-examinations are required under the act, on and after June 1, 1887, from and after which day, it is declared the act shall be in force; Provided, that those persons already in employment in said capacities, on the first day of June, 1887, shall be allowed until the first day of August, 1887, in which to procure the necessary certificates.” For the purpose of making the examinations, it is made the duty of the Governor to appoint as examiners a suitable number of properly qualified medical men, and to distribute them through the State as to best subserve the convenience of all parties concerned. Section five provides: “That any one of the examiners is hereby authorized to make the examination and issue the certificates required by this act, and for each and every such examination he shall be entitled to a fee of three dollars.” — Acts, 1886-87, p. 87.
The appellee, being a train conductor in the employ of the Louisville and Nashville railroad company, applied to appellant, one of the examiners appointed by the Governor, for examination, and if found qualified, for the necessary certificate. While appellant offered to make the examination, he stated that he would not issue a certificate to appellee, though qualified, unless he would pay the fee for the examination; assigning as the reason, that he had previously examined several employees, and the company had refused to pay the fees, declaring that they intended to contest the liability and the constitutionality of the statute. The appellee declined to pay the fee, and instituted this proceeding for a mandamus, to compel the examiner to examine him, and, if found fit for his position, to give him the requisite certificate.
A public officer is, beyond controversy, entitled to compensation for his services; and the general rule is, that if a statute prescribes the fees which the officer shall receive, and omits to specially provide when, how, or by whom they shall be paid, the person at whose request the service is rendered is liable, and the officer is entitled to payment as the services are performed. — People v. Harlow, 29 Ind. 43; Ripley v. Gifford, 1 Iowa, 367. If there was no provision of the statute relating to the payment of the fee allowed the ex-*276arniner, other than the fifth section, there could be no serious controversy as to the liability of the applicant for examination, and that the examiners would be justified in refusing to make the examination, and to issue the certificate on his declaration that he would not pay the fee. But the third section, expressly, and in unambiguous terms, declares, that the examination and re-examinations required shall be “at the expense of the railroad companiesand in the same section, it is made a misdemeanor for any railroad company, officer or agent of the same, to employ in any of the capacities specified a person who does not possess a certificate of fitness, issued in accordance with the requirements of the act. Comparing and construing the two sections, the fifth fixes the amount of the fee, and the third provides by whom it shall be paid. When the services and the fees are both regulated by statute, an officer can not exact any fee not allowed; and if the statute further provides by whom, or the manner in which, the fees shall be paid, he can not exact a fee other than as so provided, though he may have performed the services at the request of another party. Brophy v. Marble, 118 Mass. 548.
The statute requires examinations of all persons, and the possession of the necessary certificates, before serving in any of the capacities specified, whether or not they were in the employment of a railroad company on June 1,1887; and it is insisted, that it could not have been intended, that the examination of those not employed, and who may never be employed, should be at the expense of the railroad companies. It will be conceded that the terms, though comprehensive, are indefinite and uncertain in this respect; and it may be, that in order to avoid such resultant hardship and injustice, the proviso to the third section, extending to employees the time for obtaining the certificates, should be construed as designed to limit and qualify the general provision ; so that applicants for examination, not employees, would be personally liable for the fee of the examiner, there being in such case, no provision that it shall be otherwise paid. But such is not this case. The petition states, and the facts are admitted by the answer, that the petitioner had been in the employment of the Louisville & Nashville Railroad Company as conductor, for six years past, and that he informed the examiner that he was and is so employed, and made the application as such employee. These averments define the status of petitioner, and show that he falls within the class of persons entitled to the extended time in which to procure the certificates. And counsel for both parties concur in the construction, that as to employees, the examinations *277are made at the expense of the employing railroad company. Counsel for appellant insist that it is, under the statute, the duty of the company to have its employees examined; and that the examiner should not be required to make the examination and issue the certificate, especially when the company refuses to pay and denies its liability, without payment of the fee on making the examination and delivery of the certificate. The argument is, that the Legislature, in framing a law for the protection of human life, could not have intended to provide for the appointment of agents to carry it into operation, and impose upon them the risk and expense of protracted litigation to obtain their compensation. Consequences may, and should be considered, when construing terms of doubtful import; but, notwithstanding such may be the consequences, the Legislature made the statute, and if ita lex scripta est, it is our duty to declare it as written. If the construction contended for be correct, the consequences to the employees would be more far-reaching and serious, making an employee’s right to pursue a lawful occupation, when he has done all required of him, dependent upon performance by a third person, for whom he is in no wise responsible, and over whom he has no control. The case is not analogous, where the fees for a license to pursue an avocation are payable by the party himself. He is personally responsible, and has control of himself. An employee must be examined and obtain the requisite certificate, or abandon his occupation, or subject himself to punishment. It could not have been designed by a statute, which requires an employee to be examined by an examiner appointed by the State, to obtain his certificate of fitness, ana exempts him from liability for the fee by imposing the expense upon his employer, to deny him the right to examination and the certificate, merely because the employer may refuse to pay. The Legislature should and must have contemplated, that the railroad companies had a legal right to contest tiieir liability, and, by providing in general terms, that the examinations shall be at their expense, without special provisions as to the mode or time of payment, left the examiner to resort to the ordinary remedies for the enforcement of disputed liabilities. Whatever may be the consequences to the examiner, they are the natural results of the anomalous legislation of prohibiting a citizen to engage in a lawful employment without first obtaining a license or certificate, and requiring the fee to be paid by a third person, over whom he has no power. It will not do to say, that the employee may avoid the difficulty by paying •the fee; it is a sufficient answer, that the law does not *278require him to pay it. The examiners accepted the appointment with a knowledge of the provisions of the statute, and they take it cum onere. Their acceptance is voluntary; the examination of the employee, and procurement of the necessary certificate, are compulsory. — Pollard v. Brewer, 59 Ala. 130.
The offer to examine, accompanied with the avowal by the examiner that he would not grant a certificate of fitness, though found qualified, without payment of the fee, was substantially and practically a refusal to perform the duty which he owed the petitioner, under the 'statute, by affixing to its performance an unauthorized condition. Possession of the certificate is the statutory authority to serve in the specified capacities — the shield which protects. The examination is the means to a substantial end; and if the applicant is found qualified, would be meaningless and fruitless without the certificate. The law regards the substance. The appellant was not authorized to make the payment of the fee a condition of the delivery of the certificate, and hence has declined to examine the petitioner in the sense the statute contemplates and provides. The petitioner has a clear legal right to be examined, and if found qualified, to a certificate of fitness for his position; the corresponding duty is devolved on the examiner to make the examination, and grant the certificate, if found competent; and mandamus is the only adequate legal remedy to compel its performance. The petitioner is entitled to a mandatory order, requiring the examination without reference to the payment of the fee. — Mobile Mutual Ins. Co. v. Cleveland, 76 Ala. 321.
Neither party is in a position to assail the constitutionality of the statute, both claiming and asserting rights under it as a valid enactment. We have, therefore, not considered the constitutionality of any of its provisions, and do not wish to be understood as intimating any opinion. We have assumed its validity as between the parties to this proceeding, solely for the purposes of this decision.
Affirmed.