
44 Cal.App.2d 718 (1941)
DEL MAR CANNING CO. (a Corporation) et al., Appellants,
v.
PACIFIC GAS & ELECTRIC COMPANY (a Corporation), Respondent.
Civ. No. 11502. 
California Court of Appeals. First Dist., Div. One.  
May 9, 1941.
 Walter Slack and John Milton Thompson for Appellants.
 Thos. J. Straub, John J. Briare, Frederick T. Searls and Wyckoff, Gardner & Parker for Respondent.
 PETERS, P. J.
 Plaintiffs appeal from a portion of the order of the trial court taxing costs. The items objected to all deal with mileage fees allowed for one hundred miles, one way, for some nineteen witnesses who voluntarily appeared and testified at the request of defendant, and who lived outside the county and more than one hundred miles from the place of trial. The sole question presented on this appeal is whether a successful litigant may recover, as costs, mileage fees for one hundred miles one way of witnesses who appear voluntarily and testify and who reside out of the county at a distance greater than one hundred miles from the place of trial.
 [1] The right to recover costs is a matter of statutory regulation. (Williams v. Atchison etc. Ry. Co., 156 Cal. 140 *719 [103 P. 885, 134 Am.St.Rep. 117, 19 Ann. Cas. 1260].) [2] Sections 1032 and 1033 of the Code of Civil Procedure provide for the recovery of costs by the prevailing party. These sections do not set forth what items may be recovered. Section 4300g of the Political Code provides for the circumstances under which a witness may collect his fees. It provides that:
 "For each day's actual attendance, when legally required to attend upon the superior court, per day, two dollars in civil cases and one dollar and fifty cents in criminal cases."
 "Mileage actually traveled, one way only, per mile, ten cents ...".
 Section 1989 of the Code of Civil Procedure provides that: "A witness is not obliged to attend as a witness before any court, ... out of the county in which he resides, unless the distance be less than one hundred miles from his place of residence to the place of trial." As originally enacted in 1872 this section provided for a thirty-mile distance for the range of a subpoena. In 1915 (Stats. 1915, p. 330) the distance was raised to fifty miles. The present provision was adopted in 1935 (Stats. 1935, p. 942).
 It will be noted that under section 4300g of the Political Code, supra, witness' fees are composed of two elements: First, an allowance for attendance, and, secondly, an allowance for mileage. In the paragraph of the section dealing with the allowance for attendance it is provided that such fee is allowable only when the witness is "legally required to attend upon the superior court." There is no such express provision contained in the paragraph dealing with the allowance for mileage, but the same limitation is implied. Appellants contend that, properly construed, the section prohibits the recovery of mileage for those witnesses who do not reside within the effective range of a subpoena, and who could not be compelled to attend, but do so voluntarily.
 It has long been settled that if a witness resides within the effective range of a subpoena the mere fact he appears voluntarily does not prevent his fees being allowed as costs. This was the precise point involved in Linforth v. San Francisco Gas etc. Co., 9 Cal.App. 434 [99 P. 716]. It was there held that witnesses who had not been subpoenaed, but who had appeared voluntarily, were entitled to their fees, and that they were properly charged as costs. The opinion *720 does not state whether the witnesses resided within the range of a subpoena, but the inference is that they did. Hence, they were witnesses that could have been subpoenaed. The court held that, although they had appeared voluntarily, witness' fees were properly included within the cost bill. It was held that when a witness is sworn and testifies, he is legally required to attend upon the court equally with the witness who has been subpoenaed. The court expressed the view that to require witnesses to be subpoenaed as a condition precedent to allowance of a witness fee, would simply mean that the cost of serving the subpoena would be imposed on the losing party.
 This same conclusion was reached in Naylor v. Adams, 15 Cal.App. 353 [114 P. 997]. In that case two witnesses resided about two hundred miles from the place of trial. They appeared voluntarily and testified as witnesses on behalf of plaintiff and were paid by plaintiff. Plaintiff included in his cost bill both an attendance fee and a mileage fee for these two witnesses. The court held that the attendance fees were allowable, although the witnesses lived outside the effective range of a subpoena. This conclusion was based on the theory that, having submitted themselves as witnesses, they were legally required to attend and were therefore entitled to their attendance fee. But the court held that the prevailing party was not entitled to recover a mileage allowance for these witnesses. Apparently, the theory of the court was, that, so far as the mileage allowance was concerned, such witnesses were not legally required to attend since they could not have been subpoenaed. It is quite apparent from the opinion in that case that the court was considerably impressed by the thought that, if it was held that mileage was to be allowed witnesses at the rate of ten cents a mile however great the distance from which they came, an intolerable cost burden would be cast on the losing party. The real basis of the court's opinion is to be found in the following language appearing at page 356:
 "The right of a witness to mileage and other fees in civil cases is purely and solely of statutory creation, and a court is without the power to saddle on the vanquished party in such cases costs which are not thus strictly authorized. If, as is suggested by respondent, the contention of appellant *721 must be sustained, there would be no barrier against the exercise by a court of the power to allow voluntary witnesses residing a thousand or many more miles from the place of trial the mileage prescribed by the statute. The principle upon which such power, if authorized, could be exercised would be the same whatever the distance beyond the thirty miles out of the county from the place of trial, and thus it may easily be imagined how, by calling such power into action, a litigant might impose upon his vanquished adversary a very unjust and even unbearable burden." The court evidently did not consider, and certainly it did not discuss, the possibility of limiting the allowance for the mileage of such witness to the statutory range of a subpoena. It is our opinion that all that was held in the Naylor case was that mileage fees may not be allowed for the entire distance when the witness resides outside the county and more than one hundred miles from the place of trial. The case cannot be considered as authority on the point that such fees may not, under such circumstances, be allowed for the distance fixed by statute as the distance within which a subpoena can be served.
 A logical argument could be advanced to the effect that any witness voluntarily appearing is not "legally required to attend", as required by section 4300g of the Political Code, supra, and is therefore neither entitled to an attendance nor a mileage fee. But the Linforth case, supra, decided in 1908, so far as attendance fees are concerned, decided otherwise. This view was reaffirmed in the Naylor case, supra, decided in 1911. This has been the unquestioned law for thirty-three years. If that be accepted as the law, and appellants do not challenge that doctrine, then such witness, when voluntarily appearing, is "legally required to attend" within the mileage provision. Section 4300g of the Political Code must be read together with section 1989 of the Code of Civil Procedure. So construed, the mileage fee is limited to the distance fixed by law for the effective range of a subpoena--at present one hundred miles. Any other rule would require the litigant to take the testimony of such witness by deposition, a more expensive, and certainly less satisfactory, method than the production of the witness in court.
 The rule here approved was adopted by the District Court of the Southern District of California in United States v. *722 Southern Pac. Co., 230 Fed. 270. The federal statute provides for attendance and mileage fees for witnesses who attend "in court, ... pursuant to law", and limits the effective range of a subpoena to one hundred miles. The witnesses had come from the northern district to the southern district of California to testify. The clerk allowed mileage for each witness for a distance of 275 miles, which was the distance from the northerly boundary of the southern district to the place of trial. The court held that a witness voluntarily appearing nevertheless appeared "pursuant to law" and was entitled to mileage fees for a distance of one hundred miles, the effective range of a subpoena. In so holding the court expressly refused to follow earlier decisions which held that mileage fees were not allowable when the witness appeared voluntarily.
 Cases from other states are discussed in the briefs. Some turn upon the peculiar language of the statute under construction. Some of them hold that mileage fees will not be allowed when a witness appears voluntarily, while others hold to the contrary. We are of the opinion that the better reasoned cases and the sounder arguments support the construction that witness' fees for mileage should be allowed as costs, one way, for a distance of one hundred miles for the witness who appears voluntarily and testifies, and who resides outside the county and more than one hundred miles from the place of trial.
 The order appealed from is affirmed.
 Knight, J., and Ward, J., concurred.
