
150 Cal.App.2d 1 (1957)
WILLIAM B. ACTON, Petitioner,
v.
WILLIAM L. HENDERSON, as Secretary to the Civil Service Commission, etc., et al., Respondents; SAN FRANCISCO CITY AND COUNTY EMPLOYEES LOCAL 747 et al., Interveners.
Civ. No. 17629. 
California Court of Appeals. First Dist., Div. One.  
Apr. 9, 1957.
 J. Joseph Sullivan, Steinhart, Goldberg, Feigenbaum & Ladar, McEnerney & Jacobs, Garrett McEnerney II, Justin M. Jacobs and E. John Kleines for Petitioners.
 Dion R. Holm, City Attorney (San Francisco), Norman Sanford Wolff, William F. Bourne and Jerome Cohen, Deputy City Attorneys, for Respondents.
 John J. Fahey, Jr., M. Mitchell Bourquin, H. Ward Dawson, Jr., and J. Edward Fleishell for Interveners.
 PETERS, P. J.
 These three petitions for mandamus have been consolidated for consideration. Each prays that this court compel respondents, who are the appropriate officials of the city and county, to take the steps necessary to pay the salary claimed to have been earned by each petitioner as an employee of the city and county. The petitioners are Thomas A. Brooks, the chief administrative officer of the city and county, William B. Acton, principal attorney in the office of the district attorney, and Walter Heil, director of the M. H. de Young Memorial Museum. The respondents are William L. Henderson, personnel director and secretary to the civil service commission who must approve all payrolls, and Harry *6 D. Ross, controller of the city and county, who pays only those payrolls approved by Henderson. Gertrude H. Downing, a taxpayer, has been permitted to intervene in the Brooks case, and to appear as an amicus curiae in the other two proceedings. Also appearing as an amicus curiae is Local 747 of the American Federation of State, County and Municipal Employees, who appears in opposition to petitioner Brooks, and in opposition to petitioners Acton and Heil appears the Civil Service Association of San Francisco. It was stipulated at the oral argument that the amici curiae could be considered as interveners in all of the actions so as to permit them to raise any legal questions that could be raised only by the parties to the actions.
 The controversy is simple to state. Under the terms of several ordinances passed by the supervisors of the city and county, the three petitioners, just prior to the dates they would have been compelled to retire under the charter, resigned from the positions they then occupied, withdrew their contributions from the local retirement system, and were then reappointed by the proper authorities to the positions they formerly occupied. As such reappointed officials they did not become members of the retirement system. In July of 1956 Gertrude H. Downing, the taxpayer who appears here as an intervener and amicus curiae, brought an action in the local superior court against the supervisors, Brooks, Henderson and Ross, challenging the validity of the ordinances in general and the reappointment of Brooks in particular. Henderson and Ross, who, under the provisions of the charter are personally liable for authorizing improper payments of salary, took the position that they should not approve and pay the salaries of any of the three petitioners until the validity of the ordinances involved was determined. In January of 1957, the trial court in the Downing case rendered an opinion adverse to petitioners holding the challenged ordinances to be in violation of the charter. The findings and judgment in that case have not, as yet, been entered. Petitioners then individually instituted these three mandamus proceedings.
 In these mandamus proceedings the petitioners and respondents agree and urge that the ordinances involved do not violate the charter, and so are in agreement that the writs should issue. The respondents resist payment only to protect themselves in the event the ordinances are invalid. The intervener and amici curiae, however, vigorously contest the validity of the ordinances in question, so that the proceedings are adversary in nature. *7
 All three petitioners assert that the ordinances involved are valid. If so, the writs should issue in all three cases. Petitioner Heil raises another point applicable only to himself, but this point need not be considered because of our conclusion that the challenged ordinances are valid.
 At the inception of these proceedings we are met by the contention of intervener that mandamus is not a proper remedy. It is claimed that there is a speedy and adequate remedy by way of appeal in the taxpayer's suit, and that mandamus will not lie to enforce a claim for wages by a municipal employee. (Coombs v. Smith, 17 Cal.App.2d 454 [62 P.2d 380].) But these rules are not absolute, and not jurisdictional. The appellate court has considerable discretion in determining whether to entertain such proceedings. The appeal from the superior court judgment, once it is entered, would be neither speedy nor adequate. It involves only petitioner Brooks. Neither Acton nor Heil is a party to that action, and both differ from Brooks in certain respects in employment status and relationship to the retirement systems. An appeal in the Brooks case would not necessarily determine their rights, and would require one or two more lower court actions before the controversy could be finally settled. In these consolidated proceedings in mandamus all relevant questions can be settled, thus preventing a multiplicity of actions. But even of greater importance is the public interest involved. [1] While the appellate court will not ordinarily entertain an original proceeding in mandamus to determine the validity of wage claims, that rule has no application where the public interest is such as to require a speedy determination of the controversy. (Hollman v. Warren, 32 Cal.2d 351 [196 P.2d 562].) Directly in point is Tevis v. City & County of San Francisco, 43 Cal.2d 190 [272 P.2d 757], which, while recognizing the general rule that wage claims should normally be litigated in an action at law, held that such rule should not be applied when the public interest required a speedy determination by an appellate court. At page 198 the court stated: "In a few situations involving claims by state or municipal employees for wages the general rule has been relaxed. For the most part, these cases concern disputes as to the proper construction of a statute or ordinance defining or giving rise to the exercise of official duty, and, although recognizing that the ultimate effect of a decision may be to adjudicate a money claim, they emphasize the necessity of official cooperation and the ministerial nature of the *8 official acts involved." (See also City & County of San Francisco v. Boyd, 22 Cal.2d 685 [140 P.2d 666]; Scannell v. Murphy, 82 Cal.App.2d 844 [187 P.2d 790].)
 In the instant cases the public welfare requires that the dispute here involved be speedily determined. This being so, in the exercise of our discretion, and in the interests of justice, we have decided to entertain these proceedings.
 As already pointed out, the primary point involved is the validity of certain ordinances adopted by the Board of Supervisors of the City and County of San Francisco. The effect of these ordinances was to amend section 221 of the local municipal code to read as follows:
 "Sec. 221. With the exception of those employees who are excluded from membership as provided in Section 222, of this Article, all employees shall become members of the Retirement System as follows:"
 "* * *"
 "(c) ... provided that attorneys and physicians in non-Civil Service positions who resign and withdraw their contributions from the Retirement System within sixty (60) days of the date upon which they would normally be required to retire because of age, shall not become members of the Retirement System at any later date if they are subsequently appointed to non-Civil Service positions for employment in their professional capacity to perform duties included within their professions, but exclusive of any administrative or executive positions for which such professional status constitutes only part of the qualifications therefor; and further provided that any persons occupying the position of director of any art gallery or memorial museum of the city and county who resign and withdraw their contributions from the Retirement System within sixty (60) days of the date upon which they would normally be required to retire because of age, shall not become members of the Retirement System at any later date if they are subsequently appointed to the position of director of any art gallery or memorial museum of the city and county; and further provided that any person occupying the office of Chief Administrative Officer who resigns and withdraws his contributions from the Retirement System within sixty (60) days of the date upon which such person would normally be required to retire because of age, shall not become a member of the Retirement System at any later date if such person is subsequently appointed to the Office of Chief Administrative Officer, but thereafter such person shall not occupy that office *9 for a period longer than two years after reaching the age at which he would normally have been required to retire because of age; ..."
 The first "provided" clause applicable to persons in the status of Acton was added by ordinance in September, 1952. The date of Acton's compulsory retirement would have been January 1, 1954. The second "provided" clause applicable to directors of art museums was added in August of 1955. The date of Heil's compulsory retirement would have been December 1, 1955. The third "provided" clause applicable to the chief administrative officer was added in December of 1955. Petitioner Brooks would have been compelled to retire on August 1, 1956.
 It is quite clear that in the absence of these amendments to section 221, subdivision (c), of the municipal code, the reappointment of the petitioners after their resignations from the retirement system would have been illegal because in violation of various charter provisions. The San Francisco charter contains two different retirement plans, one provided for by section 165, and the other, later in time, by section 165.2. Under section 165 retirement is compulsory at age 70, while under section 165.2 retirement, after June 30, 1952, is made compulsory at age 65. The plan provided by section 165.2 will eventually replace the plan set up by section 165 as the members under this last section die, resign or retire. Subdivision (J) of section 165.2 provides: "No person retired under this section ... entitled to receive a retirement allowance under the retirement system shall serve in any elective or appointive position in the city and county service, including membership on boards and commissions, nor shall such persons receive any payment for service rendered to the city and county after retirement. ..."
 Both plans require "miscellaneous officers and employees," who are defined as all employees except members of the police and fire departments, to be members of the retirement system. There is no provision in either charter provision permitting over-age persons to become members of the retirement system. It follows, of course, that such over-age employees, in the absence of such a provision as 221, subdivision (c), are not eligible for city and county employment. Section 163(a) of the charter also prohibits persons who have been retired for service and who are in receipt of a retirement allowance from receiving payment for any services rendered after retirement.
 Thus, the real question involved in these proceedings is *10 whether the amendments to section 221, subdivision (c), of the municipal code were lawfully adopted. If so, the writs should issue. If not, the applications for the writs should be denied.
 [2] The claimed authority for the passage of the ordinances is to be found in section 165 of the charter. That section provides, in part:
 "Section 165. Officers and employees of the city and county, except members of the police and the fire departments, shall become members of the retirement system subject only to the following provisions, in addition to the provisions contained in sections 158 to 164, of this charter, both inclusive:"
 "(a) The system shall be applied to such offices, departments, bureaus, or classes of officers or employees of the city and county, ... as the supervisors shall determine. ..."
 "(b) ... retirement shall be compulsory at the age of seventy years. ..." (Italics added.)
 This section confers on the board of supervisors the power to include within the retirement system such "offices, departments, bureaus, or classes of officers or employees" as the "supervisors shall determine." This power of inclusion, by necessary and inevitable implication, includes the power of exclusion. [3] The provision making the retirement of "members" compulsory at age 70 is clearly qualified by the discretion vested in the board.
 The intervener in the Brooks case admits that section 165(a) (subject to his later arguments in reference to section 165.2), permits the board to exclude the office of chief administrative officer entirely from the retirement system, but claims that by municipal code, section 221, subdivision (c), the board has attempted to exclude only administrative officers who have reached retirement age, and contends that this cannot be done. Intervener has misinterpreted section 165(a). That section refers not only to offices, departments and bureaus, but also to "classes of officers and employees." [4a] Thus, section 165(a) expressly confers the power to classify officers, departments and bureaus, and expressly confers the power to classify as was done in section 221, subdivision (c), of the municipal code. That such classification was reasonable and is based on distinctive factors is obvious.
 [5] There can be no reasonable doubt that employees who are members of the retirement plan provided by section 165 may be taken out of the plan by appropriate exercise of the board's discretion. Being no longer members of the plan, *11 section 165(a) permits their reemployment if the supervisors so decide. This is precisely what section 221, subdivision (c), of the municipal code provides. Thus, if section 165 were the only section to be interpreted there would be no doubt at all that that section expressly confers on the board the power to do exactly what it did do when it amended section 221, subdivision (c), of the municipal code.
 The difficulty is that there is no comparable power expressly conferred on the board as to employees retired under section 165.2. That section provides, in part:
 "Section 165.2. Miscellaneous officers and employees, as defined in this section, who are members of the retirement system under section 165 of the charter on the effective date hereof, hereby designated as the first day of July, 1947, and persons who become miscellaneous officers and employees after said effective date, shall be members of the retirement system on and after said date, subject to the following provisions of this section, in addition to the provisions contained in sections 158 to 161, both inclusive, of this charter notwithstanding the provisions of any other section of the charter, provided that the retirement system shall be applied to persons employed on a part-time, temporary or substitute basis only as the board of supervisors shall determine by ordinance enacted by three-fourths vote of all members of the board. Miscellaneous officers and employees of the said departments who are members of the retirement system under section 165 of the charter on said effective date, however, shall have the option to be exercised in writing on a form furnished by the retirement system and to be filed at the office of said system not later than 90 days after the effective date hereof, of being members of the system under section 165 instead of this section, the election under said option to be effective on said effective date, ... On and after said date, the persons who affirmatively exercise said option, shall continue to be members of the system under section 165 and shall not be subject to any of the provisions of this section."
 "(A) The following words and phrases as used in this section, unless a different meaning is plainly required by the context, shall have the following meaning: ..."
 "For the purposes of the retirement system and of this section, the terms 'miscellaneous officer or employee,' or 'member,' as used in this section shall mean any officer or employee who is not a member of the fire or police departments *12 as defined in the charter for the purpose of the retirement system, under section 165 of the charter. ..."
 "(B) ... Members shall be retired on the first day of the month next following the attainment by them of the age of ... sixty-five years [after June 30, 1952]."
 Section 158 of the charter also has some bearing on the power of the board of supervisors with respect to the retirement system. It reads, in part, as follows:
 "* * *"
 "Ordinance No. 5561 (New Series) and amendments thereto, now establishing the employees' retirement system, shall continue in force until amended or revoked by the board of supervisors as provided in this section. The board of supervisors is hereby empowered to enact, by a vote of three-fourths of its members, any and all ordinances necessary to carry into effect the provisions of sections 158 to 172, both inclusive, of this charter; provided that the board of supervisors shall secure, through the retirement board, an actuarial report of the cost and effect of any proposed change in the benefits under the retirement system, before enacting an ordinance or before voting to submit any proposed charter amendment providing for such change."
 [6] It is an understatement to point out that section 165.2, added to the charter in 1947, is not a model of draftsmanship. It does not spell out with clarity the relationship between it and section 165. Certainly it did not expressly or impliedly repeal all of the provisions of section 165. In fact, it expressly recognizes the continuance of the retirement plan set up by section 165. It will also be noted that there is no unambiguous specification of the supervisor's powers regarding who shall be members of the retirement plan set up by section 165.2. There is no provision comparable to that in section 165(a), above quoted, expressly conferring on the supervisors the power of determining who shall be, and who shall not be, members of the plan.
 The intervener and the amici curiae strenuously contend that in this respect the provisions of section 165.2 are totally inconsistent with section 165(a), and that section 165.2, in this respect, necessarily repealed section 165(a). The petitioners contend, with equal vehemence, and on this point are supported by respondents, that section 165.2 did not repeal by implication or otherwise section 165(a), and that, under proper rules of construction, the power conferred by section 165(a) remains unimpaired and exists as to both retirement *13 plans. Thus, the problem presented is one of construction, and can be simply stated: Did section 165.2 repeal by implication, or otherwise, the provisions of section 165(a)?
 Before this question can be answered, the proper rules of construction applicable to charters, ordinances, and the power of boards of supervisors must be set forth. [7] We start with the premise that the ordinances embodied in section 221, subdivision (c), of the municipal code are invalid if they conflict with the charter. Section 2 of the charter and section 6 of article XI of the state Constitution so provide, and the cases are in accord. (Marculescu v. City Planning Com., 7 Cal.App.2d 371 [46 P.2d 308].) [8] But in determining such validity or invalidity it is a fundamental rule that in construing a city home rule charter "the city has all powers over municipal affairs, otherwise lawfully exercised, subject only to the clear and explicit limitations and restrictions contained in the charter." (City of Grass Valley v. Walkinshaw, 34 Cal.2d 595, 598 [212 P.2d 894].) [9, 10] As was also stated in that case on the same page: "The charter operates not as a grant of power, but as an instrument of limitation and restriction on the exercise of power over all municipal affairs which the city is assumed to possess; and the enumeration of powers does not constitute an exclusion or limitation. [Citations.] ... All rules of statutory construction as applied to charter provisions [citations] are subordinate to this controlling principle. The former guide--that municipalities have only the powers conferred and those necessarily incident thereto [citation]--is inapplicable. A construction in favor of the exercise of the power and against the existence of any limitation or restriction thereon which is not expressly stated in the charter is clearly indicated. So guided, reason dictates that the full exercise of the power is permitted except as clearly and explicitly curtailed. Thus in construing the city's charter a restriction on the exercise of municipal power may not be implied."
 Section 2 of the charter expressly recognizes this rule. It provides, in part: "The city and county may make and enforce all laws, ordinances and regulations necessary, convenient or incidental to the exercise of all rights and powers in respect to its affairs, officers and employees, and shall have all rights and powers appropriate to a county, a city, and a city and county, subject only to the restrictions and limitations provided in this charter. ... The specific or enumeration in this charter of particular powers shall not be exclusive. *14 The exercise of all rights and powers of the city and county when not prescribed in this charter shall be as provided by ordinance or resolution of the board of supervisors."
 [11] In Hanley v. Murphy, 40 Cal.2d 572, 576 [255 P.2d 1], the court stated: "Under settled rules of statutory interpretation, these several sections [of the San Francisco charter] must be construed together, giving effect and meaning so far as possible to all parts thereof, with the purpose of harmonizing them and effectuating the legislative intention as therein expressed."
 [12] In California Drive-In Restaurant Assn. v. Clark, 22 Cal.2d 287, 292 [140 P.2d 657, 147 A.L.R. 1028], the court, in quoting from an earlier case, stated: "The presumption is against repeals by implication, especially where the prior act has been generally understood and acted upon. To overcome the presumption the two acts must be irreconcilable, clearly repugnant, and so inconsistent that the two cannot have concurrent operation. The courts are bound, if possible, to maintain the integrity of both statutes if the two may stand together."
 [13] Another important rule of construction was stated in Glass v. City of Fresno, 17 Cal.App.2d 555, 560 [62 P.2d 765], in the following language: "Where ordinances or by-laws have been enacted pursuant to competent authority they will be supported by every reasonable intendment, and reasonable doubts as to their validity will be resolved in their favor. Courts are bound to uphold municipal ordinances and by-laws unless they manifestly transcend the powers of the enacting body."
 These rules were reaffirmed by the Supreme Court in the recent case of City of Glendale v. Trondsen, 48 Cal.2d 93 [308 P.2d 1], which specifically reaffirmed the rules set forth in City of Grass Valley v. Walkinshaw, 34 Cal.2d 595, supra. (See also Butterworth v. Boyd, 12 Cal.2d 140 [82 P.2d 434, 126 A.L.R. 838].)
 With these rules of construction in mind, and paying deference to them as we must, the problem here involved becomes relatively simple. [14] There is no express repeal of section 165(a), of the charter in section 165.2. The two sections are not necessarily incompatible. Moreover, there are internal indications in section 165.2 that it was intended to keep section 165(a) in full force and effect. In the first paragraph of section 165.2 reference is made to section 158 of the charter, a section which confers considerable discretion on the board *15 of supervisors. The same paragraph purports to define, somewhat ambiguously, "miscellaneous officer or employee" covered by the plan as "any officer or employee who is not a member of the fire or police departments as defined in the charter for the purpose of the retirement system, under section 165 of the charter." What does this mean? [15] A fair and reasonable interpretation is that by this cross-reference the definition of the employees in section 165.2 was intended to be the same as the term is defined in section 165, and that section 165.2 was intended to be subject to section 165(a), insofar as the power of the supervisors to determine who shall be members of the system is concerned. [16] The fact that section 165.2 sets up a different retirement system, with a different age as to compulsory retirement, should not and cannot be considered as an implied repeal of section 165(a).
 Another internal evidence of the ambiguous nature of section 165.2, and particularly of its first paragraph, is found in the fact that it deals with those individuals who "shall" become members of the retirement system. But section 165(a) grants discretionary power to the board of supervisors to determine what "offices, departments, bureaus, or classes of officers or employees" shall be included in or excluded from the system. Thus, section 165.2 relates to what individuals shall become members of the system, while section 165(a) relates to what "classes" of employees shall be included or excluded. [17] It is a possible and reasonable interpretation that section 165.2 affects all individuals who have not been made, constitutionally, a member of an exempt class under the power conferred by section 165(a).
 The intervener and amici curiae present many arguments as to why section 221, subdivision (c), of the municipal code contravenes section 165.2 of the charter. They are supported in this contention by a memorandum opinion written by Judge J. F. Good of Butte County, sitting in San Francisco pro tem., who held that the ordinances were invalid. In this opinion he made no mention of the applicable rules of construction to which reference has been made. The basic premise of all of these arguments is that the first paragraph of section 165.2 provides that the new section affects "miscellaneous officers and employees" who are members of the retirement system under section 165 on July 1, 1947, and persons who become such officers and employees thereafter "notwithstanding the provisions of any other section of the charter." This refers to all miscellaneous officers and employees except *16 part-time, temporary and substitute employees, and persons under the plan provided by section 165 who elect to continue under the old plan. Retirement is made mandatory under both plans. It is argued that the specific provision giving the supervisors discretion over the retirement of part-time, temporary, or substitute employees necessarily implies that the board retains no discretion regarding other employees, regardless of which plan they elect. It is argued that the reference to section 165 in section 165.2 in the provision defining "miscellaneous officers and employees" cannot be construed as continuing the discretion conferred on the board by section 165(a), because such a construction would be inconsistent with the specific designation in section 165.2 as to who shall be members of the plan. The provision abrogating any provision of the charter in conflict with section 165.2 compels the conclusion, so it is argued, that the powers vested in the supervisors by section 165(a) were abrogated by section 165.2.
 Other less forceful arguments are made by intervener and amici curiae. Counsel point out in detail various provisions of section 165.2 that are inconsistent with provisions of section 165. But none of these provisions are necessarily inconsistent with the power conferred by section 165(a). To hold that these ambiguous provisions repealed section 165(a) would require this court to disregard the rules of construction, and the public policy upon which they are based, above set forth. This we cannot do.
 It is undoubtedly true that portions of the first paragraph of section 165.2, and other portions of section 165.2, can be interpreted as being inconsistent with the continued existence of the power conferred by section 165(a). But in order to so construe the section it must be found that section 165.2 clearly and explicitly curtailed section 165(a); that section 165.2 is irreconcilable, clearly repugnant and so inconsistent that the two sections cannot have concurrent operation. Tested by these standards the arguments in favor of the implied repeal of section 165(a) all fail.
 It is to be remembered that under the rules of construction already discussed it must be held that the board of supervisors had the power to pass section 221, subdivision (c), of the municipal code unless that power has been denied to the board, expressly or by necessary implication. It may be that, if section 165.2 of the charter were to be considered alone, it could be interpreted to negative the existence of the claimed power. That is the most that the arguments of intervener and *17 amici curiae establish. But section 165.2 does not stand alone. The power to pass section 221, subdivision (c), does not depend upon an interpretation that it exists because of a failure of the charter to deny its existence. As already pointed out, the power to pass the ordinance is conferred expressly by section 165(a) of the charter. That grant of power has not been expressly repealed. Before it can be held to have been repealed by implication by section 165.2 it must be held that that section is so inconsistent with section 165(a) that the two cannot stand together. To say the least (as the arguments of able counsel on both sides of this litigation illustrate), section 165.2 is ambiguous in this respect. There are two possible constructions of section 165.2--one that it repeals section 165(a) by implication, and one that it does not. It may be conceded that either interpretation is a reasonable one, perhaps even equally so. But once it is determined that there is an ambiguity, and that a possible and reasonable interpretation against repeal exists, then our task is done, and our duty is clear. We must indulge in the interpretation against the claimed implied repeal.
 We have discussed this problem of construction at some length. This is partly due to the fact that able counsel argue with such obvious sincerity that section 165.2 is so inconsistent with section 165(a), that the power to pass section 221, subdivision (c), of the municipal code does not exist. In order to be fair to all concerned we have carefully considered and appraised all of the arguments of the intervener and amici curiae. But the length of the discussion should not be taken as an indication that the legal problem involved is complex or difficult, or that the court has any mental reservations about its solution. Actually, the legal problem involved is a relatively simple one. Once the two charter provisions are quoted, and the rules of construction established, the solution is clear, obvious and inevitable. [18] The power to pass section 221, subdivision (c), existed.
 The other major contention of intervener and of amici curiae is that, even if it be assumed that the charter permits the board to enact legislation permitting certain classes of employees to work beyond retirement age, section 221, subdivision (c), of the municipal code is an invalid exercise of that power because the classifications contained in that section are discriminatory and so in violation of the federal and state Constitutions.
 [19] Article I of section 21 of the state Constitution provides: *18 "No special privileges or immunities shall ever be granted which may not be altered, revoked, or repealed by the Legislature; nor shall any citizen, or class of citizens, be granted privileges or immunities which, upon the same terms, shall not be granted to all citizens."
 The second clause of this provision is applicable to and constitutes a restraint upon boards of supervisors and municipal legislative bodies. (In re Blois, 179 Cal. 291 [176 P. 449].) [20] But neither the state nor the federal Constitution prohibits proper legislative classification. (Home Ins. Co. v. New York, 134 U.S. 594 [10 S.Ct. 593, 33 L.Ed. 1025].) [21] The proper rule was stated in Martin v. Superior Court, 194 Cal. 93, at page 100 [227 P. 762], in the following language: "A law is not special legislation merely because it does not apply to all persons. It is a settled principle of constitutional law that the legislature may classify for the purpose of meeting different conditions, naturally requiring different legislation, in order that legislation may be adapted to the needs of the people. If the law is to bear equally upon all persons, the legislature must classify whenever there exists a reason which may rationally be held to justify a diversity of legislation. In other words, different persons, different localities, and different governmental organizations and agencies may justly be found by the legislature to stand in different relations to the law and if the same law were, in such a situation, to be applied to all alike, it would not bear equally upon each of them."
 [22] On the same page the court outlined the nature of the inquiry that must be made in passing on a legislative classification as follows: "The classification, however, must not be arbitrarily made for the mere purpose of classification, but must be based upon some distinction, natural, intrinsic or constitutional, which suggests a reason for and justifies the particular legislation. That is to say, not only must the class itself be germane to the purpose of the law but the individual components of the class must be characterized by some substantial qualities or attributes which suggest the need for and the propriety of the legislation. Subject to these limitations a law is general despite the fact that it operates only upon a class of individuals or things, if it applies equally to all persons or things within the class to which it is addressed."
 [23, 24] The Supreme Court, in the Martin case, also emphasized the rule of deference that must be applied by the judiciary in passing upon a legislative classification. The court stated *19 (p. 101): "The power to thus classify necessarily carries with it a wide discretion in the exercise thereof. The authority and the duty to ascertain the facts which will justify classified legislation must of necessity rest with the legislature, in the first instance, to whom has been given the power to legislate and not to the courts and the decision of the legislature in that behalf is ordinarily conclusive upon the courts. Every presumption is in favor of the validity of the legislative act and the legislative classification will not therefore be disturbed unless it is palpably arbitrary in its nature and neither founded upon nor supported by reason. [Citation.] It follows that in any given case if the existence of a state of facts of which the court may take judicial notice seems to have been made the basis of a particular piece of legislation and if it may be reasonably said that such facts afford good ground for the making of a particular classification the legislative enactment will be upheld although the reason therefor does not appear prima facie in the law itself." (See also In re Herrera, 23 Cal.2d 206 [143 P.2d 345]; Brophy v. Employees Retirement System, 71 Cal.App.2d 455 [162 P.2d 939].) [25- 27] In California Drive-In Restaurant Assn. v. Clark, 22 Cal.2d 287, 300 [140 P.2d 657, 147 A.L.R. 1028], the court quoted with approval the following statement appearing in American Jurisprudence:
 "The relation of employer and employee has long been the basis for specific legislation, and statutes applicable only to such relation are not subject to the objection that they constitute class legislation. Moreover, the equal protection of the laws is not denied by the classification of occupations if such classification has a reasonable basis. Such classification may be based upon matters which are personal to the individuals who are acting as employees. For example, statutory regulations with reference to labor of women or children or both may be sustained as against the objection that they constitute an arbitrary discrimination because they do not extend to men. Moreover, the classification may be based not only on the character of the employees but upon the nature of the employer's business, since the character of the work may largely depend upon the nature and the incidents of the business in connection with which the work is done. A statute dealing with employees in a particular line of business does not create an arbitrary discrimination merely because the operation of the statute is not extended to other lines of business *20 having their own circumstances and conditions, or to domestic service."
 [4b] Tested by these standards it is too clear to require extended discussion that the classification contained in section 221, subdivision (c), of the municipal code is not "palpably arbitrary in its nature," but is reasonable and within the proper sphere of legislative discretion.
 Each of the three amendments to the section is made applicable to persons within the class affected only when they have reached retirement age. Thus, the ordinances classify between employees below retirement age and those over it. As already pointed out, section 165(a) of the charter grants the power to the board of supervisors of inclusion and exclusion not only as to such "offices, departments, bureaus" as the board shall determine, but also to determine what "classes of officers or employees of the city and county" the retirement system will include. [28] Obviously, a reasonable basis exists for classifying between those above and below retirement age. All those below must belong to the system and must retire at retirement age unless the board decides, as it did by passing section 221, subdivision (c), of the municipal code providing that the classes of employees mentioned may resign and be reappointed. This classification was a reasonable one.
 [29a] It is contended by the intervener and by amici curiae that placing the "chief administrative officer" in a separate class from other employees or from other heads of departments is arbitrary. The contention is unsound. Under the charter the chief administrative officer is the head of the entire administrative department of government and is granted extraordinary powers not granted to other public employees or officers. The electorate in approving the charter clearly provided for three branches of city and county government--the executive, headed by the mayor, the legislative, headed by the board of supervisors, and the administrative, headed by the chief administrative officer. Thus the electorate placed the chief administrative officer in a special class when it adopted the charter. [30] The position is unique, different and distinguishable from all other positions in city and county government. [29b] This uniqueness of position alone justifies the classification.
 [31a] The classification in which petitioner Acton is found is equally reasonable. One of the amendments to section 221, subdivision (c), grants to "attorneys and physicians in non-Civil *21 Service positions" the conditional option to continue in city employment past retirement age. The charter itself--section 142--distinguishes these employees from the great mass of city and county employees by exempting them from the city and county civil service system. [32] It requires no citation of authority to establish that physicians and attorneys may be classified differently than other businesses, professions and employments. The State Bar Act applicable alone to attorneys, and the State Medical Practice Act, applicable alone to doctors, are examples of the state classifying these professions differently from all others. [31b] Obviously, this classification is well within constitutional limits.
 [33] Petitioner Heil is the director of the de Young Museum. One of the amendments to section 221, subdivision (c), is made applicable to "directors of museums." This position is not as important or as unique as that of chief administrative officer, nor as widely recognized as subject to classification as the occupations of physician or attorney. But the charter itself--sections 50, 51 and 52--provides specially for the appointment of three museum directors and for their management of the three public museums. The obvious cultural and administrative requirements of these positions provide a legitimate basis for the classification.
 The other contentions of the intervener and of amici curiae are all unsound and do not require discussion. We conclude that the three questioned additions to section 221, subdivision (c) of the municipal code are valid and constitutionally sound.
 Let the writs of mandate issue as prayed for.
 Bray, J., and Wood (Fred B.), J., concurred.
