Opinion
BAXTER, J.The Court of Appeal invalidated, on constitutional grounds, an ordinance of the City of Santa Ana (Santa Ana) which banned “camping” and storage of personal property, including camping equipment, in designated public areas. We granted the petitions for review of Santa Ana and the People to consider whether the ordinance is valid on its face and whether either of the actions involved in the consolidated appeal stated an “as applied” challenge to the ordinance.
We conclude only a facial challenge was perfected in the lower courts and that the Santa Ana ordinance is valid on its face. It does not impermissibly restrict the right to travel, does not permit punishment for status, and is not unconstitutionally vague or overbroad, the only constitutional claims pursued by plaintiffs.1
We shall, therefore, reverse the judgment of the Court of Appeal.
I
Background
In October 1992, Santa Ana added article VIII, section 10-400 et seq. (the ordinance) to its municipal code. The declared purpose of the ordinance was *1081to maintain public streets and other public areas in the city in a clean and accessible condition. Camping and storage of personal property in those areas, the ordinance recited, interfered with the rights of others to use those areas for the purposes for which they were intended.
The ordinance provides:
“Sec. 10-402. Unlawful Camping.
“It shall be unlawful for any person to camp, occupy camp facilities or use camp paraphernalia in the following areas, except as otherwise provided:
“(a) any street;
“(b) any public parking lot or public area, improved or unimproved.
“Sec. 10-403. Storage of Personal Property in Public Places.
“It shall be unlawful for any person to store personal property, including camp facilities and camp paraphernalia, in the following areas, except as otherwise provided by resolution of the City Council:
“(a) any park;
“(b) any street;
“(c) any public parking lot or public area, improved or unimproved.”2
Plaintiffs in these consolidated actions3 are: (1) homeless persons and taxpayers who appealed from a superior court order which struck “to live *1082temporarily in a camp facility or outdoors” from the ordinance,4 but otherwise denied their petition for writ of mandate by which they sought to bar enforcement of the ordinance (Tobe),5 and (2) persons who, having been charged with violating the ordinance, demurred unsuccessfully to the complaints and thereafter sought mandate to compel the respondent municipal court to sustain their demurrers (Zuckemick).
Plaintiffs offered evidence to demonstrate that the ordinance was the culmination of a four-year effort by Santa Ana to expel homeless persons. There was evidence that in 1988 a policy was developed to show “vagrants” that they were not welcome in the city. To force them out, they were to be continually moved from locations they frequented by a task force from the city’s police and recreation and parks departments; early park closing times were to be posted and strictly enforced; sleeping bags and accessories were to be disposed of; and abandoned shopping carts were to be confiscated. Providers of free food were to be monitored; sprinklers in the Center Park were to be turned on often; and violations of the city code by businesses and social service agencies in that area were to be strictly enforced. This effort led to a lawsuit which the city settled in April 1990.
Santa Ana then launched an August 15, 1990, sweep of the civic center area arresting and holding violators for offenses which included blocking passageways, drinking in public, urinating in public, jaywalking, destroying vegetation, riding bicycles on the sidewalk, glue sniffing, removing trash from a bin, and violating the fire code. Some conduct involved nothing more than dropping a match, leaf, or piece of paper, or jaywalking. The arrestees were handcuffed and taken to an athletic field where they were booked, chained to benches, marked with numbers, and held for up to six hours, after which they were released at a different location. Homeless persons among the arrestees claimed they were the victims of discriminatory enforcement. The municipal court found that they had been singled out for arrest for offenses that rarely, if ever, were the basis for even a citation.
In October 1990, Santa Ana settled a civil action for injunctive relief, agreeing to refrain from discriminating on the basis of homelessness, from taking action to drive the homeless out of the city, and from conducting *1083future sweeps and mass arrests. That case, which was to be dismissed in 1995, was still pending when the camping ordinance was passed in 1992.
Evidence in the form of declarations regarding the number of homeless and facilities for them was also offered. In 1993 there were from 10,000 to 12,000 homeless persons in Orange County and 975 permanent beds available to them. When National Guard armories opened in cold weather, there were 125 additional beds in Santa Ana and another 125 in Fullerton. On any given night, however, the number of shelter beds available was more than 2,500 less than the need.
The Court of Appeal majority, relying in part on this evidence, concluded that the purpose of the ordinance—to displace the homeless—was apparent. On that basis, it held that the ordinance infringed on the right to travel, authorized cruel and unusual punishment by criminalizing status, and was vague and overbroad. The city contends that the ordinance is constitutional on its face. We agree. We also conclude that, if the Tobe petition sought to mount an as applied challenge to the ordinance, it failed to perfect that type of challenge.
II
Preliminary Considerations
A. Facial or As Applied Challenge.
Plaintiffs argue that they have mounted an as applied challenge to the ordinance as well as a facial challenge. While they may have intended both, we conclude that no as applied challenge to the ordinance was perfected. The procedural posture of the Zuckemick action precludes an as applied challenge, which may not be made on demurrer to a complaint which does not describe the allegedly unlawful conduct or the circumstances in which it occurred. The Tobe plaintiffs did not clearly allege such a challenge or seek relief from specific allegedly impermissible applications of the ordinance. Moreover, assuming that an as applied attack on the ordinance was stated, the plaintiffs did not establish that the ordinance has been applied in a constitutionally impermissible manner either to themselves or to others in the past.
Because the Court of Appeal appears to have based its decision in part on reasoning that would be appropriate to a constitutional challenge based on a claim that, as applied to particular defendants, the Santa Ana ordinance was invalid, we must first consider the nature of the challenge made by these petitioners. *1084A facial challenge to the constitutional validity of a statute or ordinance considers only the text of the measure itself, not its application to the particular circumstances of an individual. (Dillon v. Municipal Court (1971) 4 Cal.3d 860, 865 [94 Cal.Rptr. 777, 484 P.2d 945].) “ ‘To support á determination of facial unconstitutionality, voiding the statute as a whole, petitioners cannot prevail by suggesting that in some future hypothetical situation constitutional problems may possibly arise as to the particular application of the statute .... Rather, petitioners must demonstrate that the act’s provisions inevitably pose a present total and fatal conflict with applicable constitutional prohibitions.’ ” (Arcadia Unified School Dist. v. State Dept, of Education (1992) 2 Cal.4th 251, 267 [5 Cal.Rptr.2d 545, 825 P.2d 438], quoting Pacific Legal Foundation v. Brown (1981) 29 Cal.3d 168, 180-181 [172 Cal.Rptr. 487, 624 P.2d 1215].)
An as applied challenge may seek (1) relief from a specific application of a facially valid statute or ordinance to an individual or class of individuals who are under allegedly impermissible present restraint or disability as a result of the manner or circumstances in which the statute or ordinance has been applied, or (2) an injunction against future application of the statute or ordinance in the allegedly impermissible manner it is shown to have been applied in the past. It contemplates analysis of the facts of a particular case or cases to determine the circumstances in which the statute or ordinance has been applied and to consider whether in those particular circumstances the application deprived the individual to whom it was applied of a protected right. (See, e.g., Broadrick v. Oklahoma (1973) 413 U.S. 601, 615-616 [37 L.Ed.2d 830, 841-843, 93 S.Ct. 2908]; County of Nevada v. MacMillen (1974) 11 Cal.3d 662, 672 [114 Cal.Rptr. 345, 522 P.2d 1345]; In re Marriage of Siller (1986) 187 Cal.App.3d 36, 49 [231 Cal.Rptr. 757].) When a criminal defendant claims that a facially valid statute or ordinance has been applied in a constitutionally impermissible manner to the defendant, the court evaluates the propriety of the application on a case-by-case basis to determine whether to relieve the defendant of the sanction. (Hale v. Morgan (1978) 22 Cal.3d 388, 404 [149 Cal.Rptr. 375, 584 P.2d 512].)
If a plaintiff seeks to enjoin future, allegedly impermissible, types of applications of a facially valid statute or ordinance, the plaintiff must demonstrate that such application is occurring or has occurred in the past. In Bowen v. Kendrick (1988) 487 U.S. 589 [101 L.Ed.2d 520, 108 S.Ct. 2562], for instance, the court first distinguished the nature of facial and as applied challenges to a statute which authorized federal grants to organizations for services related to premarital adolescent sexual relations and pregnancy. The plaintiffs had standing as taxpayers to raise an establishment clause challenge to the statute and to its application. The Supreme Court held that the as *1085applied challenge could be resolved only by considering how the statute was being administered. Plaintiffs had to show that specific grants were impermissible because the grants went to “ ‘pervasively sectarian’ religious institutions” or had been used to fund “ ‘specifically religious activities].’ ” (487 U.S. at p. 621 [101 L.Ed.2d at pp. 548-549].) The matter was remanded because the district court had not identified the particular grantees or the particular aspects of their programs for which constitutionally improper expenditures had been made. Finally, the court held, a remedy should be fashioned to withdraw federal agency approval of such grants.
When a criminal defendant seeks relief from a present application of a criminal statute or ordinance on constitutional grounds, it is not the administrative agency’s “application” of the statute that is determinative, however. Whether the particular application of a statute declaring conduct criminal is constitutionally permissible can be determined only after the circumstances of its application have been established by conviction or otherwise. (See, e.g., Murgia v. Municipal Court (1975) 15 Cal.3d 286 [124 Cal.Rptr. 204, 540 P.2d 44].) Only then is an as applied challenge ripe. To obtain mandate or other relief from penalties imposed under a past application of the law, the defendant must presently be suffering some adverse impact of the law which the court has the power to redress.
If instead it is contended that an otherwise valid statute has been applied in a constitutionally impermissible manner in the past and the plaintiff seeks an injunction against future application of the statute in that manner, the plaintiff must show a pattern of impermissible enforcement. (See, e.g., Van Atta v. Scott (1980) 27 Cal.3d 424 [166 Cal.Rptr. 149, 613 P.2d 210]; White v. Davis (1975) 13 Cal.3d 757 [120 Cal.Rptr. 94, 533 P.2d 222]; Wirin v. Horrall (1948) 85 Cal.App.2d 497 [193 P.2d 470]; cf. Sundance v. Municipal Court (1986) 42 Cal.3d 1101 [232 Cal.Rptr. 814, 729 P.2d 80].)
In most cases a plaintiff seeking this relief, either by a petition for writ of mandamus or complaint for declaratory and injunctive relief, must have a sufficient beneficial interest to have standing to prosecute the action, and there must be a present impermissible application of the challenged statute or ordinance which the court can remedy. “[Code of Civil Procedure] [s]ection 1086 expresses the controlling statutory requirements for standing for mandate; ‘The writ must be issued in all cases where there is not a plain, speedy, and adequate remedy, in the ordinary course of law. It must be issued upon the verified petition of the party beneficially interested.’ The requirement that a petitioner be ‘beneficially interested’ has been generally interpreted to mean that one may obtain the writ only if the person has *1086some special interest to be served or some particular right to be preserved or protected over and above the interest held in common with the public at large.” (Carsten v. Psychology Examining Com. (1980) 27 Cal.3d 793, 796 [166 Cal.Rptr. 844, 614 P.2d 276].)
We need not decide if the Tobe plaintiffs have such a beneficial interest even though two have never been cited under the ordinance and one is not a homeless person, because as taxpayers they have standing under Code of Civil Procedure section 526a to restrain illegal expenditure or waste of city funds on future enforcement of an unconstitutional ordinance or an impermissible means of enforcement of a facially valid ordinance. (White v. Davis, supra, 13 Cal.3d 757, 764.) We must determine, therefore, whether the petitions at issue in this case stated and have perfected an as applied challenge to the Santa Ana ordinance.
1. The Tobe petition.
The first of these actions (Tobe) has been prosecuted as a petition for writ of mandate by two homeless residents of Santa Ana, each of whom intends to remain in the city, and neither of whom can find affordable housing. The third plaintiff is a resident of Santa Ana. All are taxpayers. Respondents are Santa Ana, its mayor, its city manager, and its police chief.
Plaintiffs allege that they have been convicted in the past for violating the ordinance and expect to be arrested in the future for sleeping in public and conducting other ordinary and necessary daily activities in public areas. The allegations of the petition do not describe the circumstances of the past arrests and the petition does not allege or describe either the arrests or convictions of other persons that are claimed to have been unconstitutional applications of the ordinance.
The petition alleges that respondents’ “pattern of arresting, detaining, harassing and incarcerating involuntarily homeless persons such as petitioners, for sleeping and engaging in other ordinary and essential activities of daily life” violates the rights of homeless persons. The only allegations that describe the pattern of enforcement that is claimed to be constitutionally impermissible are ones which state that respondents have caused plaintiffs and other homeless persons to risk arrest and/or detention without probable cause and other “abuses, indignities and punishment” for their homeless status and presence in Santa Ana. Although the petition alleges in conclusory language that a pattern of constitutionally impermissible enforcement of the ordinance existed, plaintiffs never identified the particular applications of the law to be enjoined. The only relief sought in the petition is a writ of *1087mandate enjoining any enforcement of the ordinance by respondents. That relief is the kind of relief sought in a facial attack.
Moreover, no alternative writ was issued and no evidentiary hearing was held. Plaintiffs did not create a factual record on which an injunction limited to improper applications of the ordinance could have been fashioned.
Thus, notwithstanding the contrary conclusion of the dissent, the allegations of the petition did not clearly state an as applied challenge to the ordinance and the petition did not seek relief from constitutionally impermissible applications or methods of enforcing the ordinance. The petition sought to enjoin any application of the ordinance to any person in any circumstance. And, contrary to the view of the dissent, which relies on “concessions” of the parties and the reporter’s transcript, rather than the actual judgment of the court, the superior court did not rule on the petition as one encompassing an as applied challenge. The order of that court which directed issuance of a peremptory writ invalidating one sentence of the ordinance as vague, did not identify or dispose of any such challenge. Instead, the court found only that “enforcement of Santa Ana Ordinance NS-2160 . . . does not violate the rights of homeless persons to freedom of movement” and that “petitioners’ challenges to the constitutionality of the remaining portions of Santa Ana Ordinance NS-2160 are without merit.”
The petition sought to enjoin enforcement of the ordinance on the ground that it was invalid because it violated the rights of the homeless. The court ruled that enforcement did not violate those rights. The court made no findings related to a pattern of enforcement of the ordinance and the judgment makes no mention of the manner in which the ordinance has been applied.
Moreover, even assuming that plaintiffs attempted to allege and prosecute an as applied challenge, and that the superior court did entertain plaintiffs’ argument that they had mounted an as applied challenge to the ordinance, the superior court did not err in failing to rule on an as applied challenge as plaintiffs did not perfect a basis for ruling on such, a challenge.
The only documents in the record that describe the manner in which the ordinance has been applied are declarations submitted six months after the petition was filed in conjunction with the superior court’s hearing on plaintiffs’ motion for issuance of a peremptory writ. Some of the declarations were by persons other than plaintiffs who stated that they had been arrested or cited for violation of the ordinance. None of those declared that he or she had ever been convicted and had a sentence imposed for violation of the *1088ordinance. None stated facts to support a conclusion that citations were given solely for the purpose of harassment and were not prosecuted thereafter, and none stated facts to support either the claim that the ordinance had been enforced discriminatorily against the homeless or the claim that a pattern of constitutionally impermissible enforcement existed. The declarations, which were the only evidence offered in the case,6 reflected only that persons who were homeless engaged in conduct that violated the ordinance and were arrested or cited for so doing.7 The declarations described the conduct which led to citations only from the perspective of the person cited. They left unclear whether it may have appeared to the officer who issued the citation that the individual was using or storing camp paraphernalia, or living temporarily, on public property.
Moreover, assuming that persons whose violation of the ordinance is involuntary may offer a due-process-based necessity defense, the declarations did not demonstrate an impermissible pattern of enforcement against such persons.8
Two of the declarants were plaintiffs. One was not homeless. The other conceded, contrary to the allegations of the petition, that he had never been cited under the ordinance.
Only one of the remaining seven declarants explained why he had not been able to find lawful shelter on the night he was cited for violation of the ordinance. That declarant was unable to get on the bus to the armory shelter on the night he was cited. His declaration, like those of most of the other declarants, did not indicate that he had applied for public assistance that might have made it possible to find housing. Among the reasons given by the other declarants for “camping” on public property at the time they were cited were that the civic center area was “safer,” that the declarant had been turned away from a shelter a few weeks earlier and had not returned, that the civic center was convenient to food and there was safety in numbers, that the declarant had missed the bus to the armory, that shelters were so noisy and overcrowded that the declarant could not sleep there, and that the declarant *1089did not like the armory because there was too much noise and he liked to be by himself.
While one of the declarants claimed to be schizophrenic, and stated that she had applied for and was awaiting Social Security assistance, she did not state whether she had sought public assistance from the county or that she had been turned away by a homeless shelter on the night she was cited.
Assuming that plaintiffs attempted to mount an as applied challenge to the ordinance on this basis, therefore, they simply did not demonstrate that the ordinance had been enforced in a constitutionally impermissible manner against homeless persons who had no alternative but to “camp” on public property in Santa Ana.
As discussed above, an as applied challenge assumes that the statute or ordinance violated is valid and asserts that the manner of enforcement against a particular individual or individuals or the circumstances in which the statute or ordinance is applied is unconstitutional. All of the declarants who had been cited under the ordinance described conduct in which they had engaged and that conduct appears to have violated the ordinance. None describes an impermissible means of enforcement of the ordinance or enforcement in circumstances that violated the constitutional rights the petition claimed had been violated. None demonstrated that the circumstances in which he or she was cited affected the declarant’s right to travel. None states facts to support a conclusion that any punishment, let alone cruel and unusual punishment proscribed by the Eighth Amendment, had been imposed. Since no constitutionally impermissible pattern, or even single instance, of constitutionally impermissible enforcement was shown, no injunction against such enforcement could be issued and none was sought by plaintiffs.
Because the Tobe plaintiffs sought only to enjoin any enforcement of the ordinance and did not demonstrate a pattern of unconstitutional enforcement, the petition must be considered as one which presented only a facial challenge to the ordinance.
2. The Zuckernick petition.
The second action (Zuckernick) has been prosecuted as a petition for writ of mandate to compel the municipal court in which petitioners are charged with violation of the ordinance to sustain their demurrers to the complaints and to dismiss the charges. The petition was filed in the Court of Appeal after the municipal court overruled the demurrers.
*1090The Zuckemick petition arises out of an order overruling a demurrer to a criminal complaint. A demurrer to a criminal complaint lies only to challenge the sufficiency of the pleading and raises only issues of law. (People v. McConnell (1890) 82 Cal. 620 [23 P. 40]; Ratner v. Municipal Court for the Los Angeles Judicial District (1967) 256 Cal.App.2d 925, 929 [64 Cal.Rptr. 500]; see also, 4 Witkin, Cal. Criminal Law (2d ed. 1989) § 2127, p. 2498.) Penal Code section 1004 expressly limits demurrers to defects appearing on the face of the accusatory pleading:
“The defendant may demur to the accusatory pleading at any time prior to the entry of a plea, when it appears upon the face thereof either:
“1. If an indictment, that the grand jury by which it was found had no legal authority to inquire into the offense charged, or, if an information or complaint that the court has no jurisdiction of the offense charged therein;
“2. That it does not substantially conform to the provisions of Sections 950 and 952, and also Section 951 in case of an indictment or information;
“3. That more than one offense is charged, except as provided in Section 954;
“4. That the facts stated do not constitute a public offense;
“5. That it contains matter which, if true, would constitute a legal justification or excuse of the offense charged, or other legal bar to the prosecution.” (Italics added.)
The Zuckemick petitioners demurred to the complaints on the ground that they did not conform to the provisions of Penal Code sections 950 and 952;9 that the facts alleged did not constitute a public offense; that the complaints contained matters constituting a legal justification or excuse *1091or other legal bar to the prosecution; and that the offense charged was unconstitutionally vague and overbroad, and violated the right to travel. The demurrer recited in addition that it was “based upon the fact that the ordinances and penal statutes allegedly violated are unconstitutionally over-broad and vague in violation of the Fourteenth Amendment to the United States Constitution and article I, section 7 of the California Constitution; unconstitutionally infringe on the defendant’s right to travel and freedom of travel |>zc].” Elsewhere the demurrer also asserted that the ordinance violates the Eighth Amendment prohibition against cruel and unusual punishment and the state constitutional prohibition against cruel or unusual punishment. (Cal. Const., art. I, § 17.)10
None of the complaints in the Zuckemick proceedings included any allegations identifying the defendant as an involuntarily homeless person whose violation of the ordinance was involuntary and/or occurred at a time when shelter beds were unavailable.11 Although the petition for writ of mandate included allegations regarding Santa Ana’s past efforts to rid the city of its homeless population, those allegations, even if true, were irrelevant to the legal sufficiency of the complaints. (Harman v. City and County of San Francisco (1972) 7 Cal.3d 150, 166 [101 Cal.Rptr. 880, 496 P.2d 1248]; People v. Williams (1979) 97 Cal.App.3d 382, 391 [158 Cal.Rptr. 778].)
The Zuckemick demurrers and petition for writ of mandate necessarily constituted only a facial attack on the ordinance since the defendants could not, on a demurrer to the accusatory pleading, offer evidence that as applied *1092to their individual circumstances the ordinance was invalid. (See Dillon v. Municipal Court, supra, 4 Cal.3d 860, 865.) Those allegations are also irrelevant in determining the facial validity of the ordinance insofar as petitioners alleged that it violated their right to travel and constituted cruel and unusual punishment for status, since they do not establish that there were no circumstances in which the ordinance could be constitutionally applied.
Therefore, while we are not insensitive to the importance of the larger issues petitioners and amici curiae12 seek to raise in these actions, or to the disturbing nature of the evidence which persuaded the Court of Appeal to base its decision on what it believed to be the impact of the ordinance on homeless persons, the only question properly before the municipal and superior courts and the Court of Appeal for decision was the facial validity of the ordinance.
We emphasize that the procedural posture of a case is not simply a “technicality.” The procedural posture of a case is crucial to determining the proper scope of appellate review. (See, e.g., Sebago, Inc. v. City of Alameda (1989) 211 Cal.App.3d 1372, 1379 [259 Cal.Rptr. 918].) The procedural posture of a case also determines the ability of the parties to exercise their right to present relevant evidence and to the creation of a full record adequate to enable the reviewing court to make a reasoned decision on the questions before it. When an appellate court fails to limit the scope of review to issues properly presented in the trial court, it denies litigants their right to have appellate questions decided on the basis of a full record which exposes all of the relevant facts and circumstances.
The importance of these considerations is most clearly demonstrated in the Zuckemick matter. There the People had no opportunity to present evidence regarding the circumstances in which the petitioners had been arrested, as the only issue before the municipal court in ruling on the demurrer was the sufficiency of the complaints. That court properly ruled that the complaints were sufficient. How then can a reviewing court find error in that ruling on the basis of evidence unrelated to the sufficiency of the complaint which the People had no opportunity to rebut in the municipal court?
*1093In the Tobe matter, notwithstanding the declarations that were submitted by the plaintiffs, there was no evidence that the ordinance had been applied to any person in a constitutionally impermissible manner.
This court’s consideration will, therefore, be limited to the facial validity of the ordinance.
B. Motive of Legislators.
The Court of Appeal also considered the evidence of Santa Ana’s past attempts to remove homeless persons from the city significant evidence of the purpose for which the ordinance was adopted. It then considered that purpose in assessing the validity of the ordinance. While the intent or purpose of the legislative body must be considered in construing an ambiguous statute or ordinance (Code Civ. Proc., § 1859; People v. Pieters (1991) 52 Cal.3d 894, 898-899 [276 Cal.Rptr. 918, 802 P.2d 420]), the motive of the legislative body is generally irrelevant to the validity of the statute or ordinance. (Birkenfeld v. City of Berkeley (1976) 17 Cal.3d 129, 145 [130 Cal.Rptr. 465, 550 P.2d 1001]; City and County of San Francisco v. Cooper (1975) 13 Cal.3d 898, 913 [120 Cal.Rptr. 707, 534 P.2d 403]; County of Los Angeles v. Superior Court (1975) 13 Cal.3d 721, 726-727 [119 Cal.Rptr. 631, 532 P.2d 495]; Sunny Slope Water Co. v. City of Pasadena (1934) 1 Cal.2d 87, 99 [33 P.2d 672]; In re Sumida (1918) 177 Cal. 388, 390 [170 P. 823]; Hadacheck v. Alexander (1915) 169 Cal. 616, 617 [147 P. 259]; Odd Fellows’ Cem. Assn. v. City and County of San Francisco (1903) 140 Cal. 226, 235-236 [73 P. 987]; Dobbins v. City of Los Angeles (1903) 139 Cal. 179, 184 [72 P. 970], revd. on other grounds (1904) 195 U.S. 223 [49 L.Ed. 169, 25 S.Ct. 18]; People v. County of Glenn (1893) 100 Cal. 419, 423 [35 P. 302].)13
The Court of Appeal relied in part on Pottinger v. City of Miami (S.D. Fla. 1992) 810 F.Supp. 1551, 1581, for its assumption that consideration of the motives of the Santa Ana City Council may be considered in assessing the validity of the ordinance. That is not the rule in this state, but even were it so, Pottinger was not a challenge to the facial validity of the Miami *1094ordinance in question there. Moreover, the district court’s conclusion that the ordinance was invalid as applied was not based on the motives of the legislators in enacting the ordinance. The court considered internal memoranda and evidence of arrest records as evidence of the purpose underlying enforcement of the ordinance against homeless persons.
Absent a basis for believing that the ordinance would not have been adopted if the public areas of Santa Ana had been appropriated for living accommodation by any group other than the homeless, or that it was the intent of that body that the ordinance be enforced only against homeless persons (see, e.g., Parr v. Municipal Court (1971) 3 Cal.3d 861 [92 Cal.Rptr. 153, 479 P.2d 353]), the ordinance is not subject to attack on the basis that the city council may have hoped that its impact would be to discourage homeless persons from moving to Santa Ana.
We cannot assume, as does the dissent, that the sole purpose of the Santa Ana ordinance was to force the homeless out of the city. The city had agreed to discontinue such attempts when it settled the prior litigation. The record confirms that the city faced a problem common to many urban areas, the occupation of public parks and other public facilities by homeless persons. Were we to adopt the approach suggested by the dissent, any facially valid ordinance enacted by a city that had once acted in a legally impermissible manner to achieve a permissible objective could be found invalid on the basis that its past conduct established that the ordinance was not enacted for a permissible purpose. Absent evidence other than the enactment of a facially valid ordinance, we cannot make that assumption here.
The dissent relies on Parr v. Municipal Court, supra, 3 Cal.3d 861, as supporting invalidation of a facially valid ordinance on the ground that it is motivated by impermissible legislative intent. The Santa Ana ordinance and the circumstances of its adoption are distinguishable from the Carmel ordinance at issue in Parr, however. There, the city had not entered into a court-approved settlement in which it stipulated that it would not engage in discriminatory enforcement of the law against “undesirables,” and, unlike the Santa Ana ordinance, the Carmel ordinance banned a customary use of the city park—sitting or lying on the lawn. A “Declaration of Urgency” which accompanied the Carmel ordinance stated that its purpose was to regulate the use of public property, parks, and beaches by transient visitors.
The Carmel ordinance was challenged as facially invalid on grounds that it discriminated against undesirable and unsanitary persons, referring to them as “hippies” and “transients.” In Parr v. Municipal Court, supra, 3 Cal.3d 861, we rejected the People’s argument that only the operative language of *1095the ordinance should be considered because the declaration of purpose suggested that the operative sections were intended to be limited in their application to the group it described. On that basis we concluded that the Carmel ordinance had a discriminatory purpose.
The ordinance, by contrast, bans use of public property in the city for purposes for which it was not designed. At the time it was adopted the city had agreed not to engage in discriminatory law enforcement. And no declaration of purpose comparable to that which accompanied the Carmel ordinance was made. The declared purpose of the ordinance did not suggest that it was to be enforced solely against the homeless. We cannot, for those reasons, join the assumption of the dissent that the purpose of the ordinance is simply to drive the homeless out of Santa Ana.14
C. Facial Challenges on Vagueness Grounds.
The Court of Appeal granted relief to the Zuckemick petitioners without regard to either the limitations on a demurrer to a criminal complaint or vagueness challenges by criminal defendants.
“The mle is well established . . . that one will not be heard to attack a statute on grounds that are not shown to be applicable to himself and that a court will not consider every conceivable situation which might arise under the language of the statute and will not consider the question of constitutionality with reference to hypothetical situations.” (In re Cregler, supra, 56 Cal.2d 308, 313.) If the statute clearly applies to a criminal defendant’s conduct, the defendant may not challenge it on grounds of vagueness. (Parker v. Levy (1974) 417 U.S. 733, 756 [41 L.Ed.2d 439, 457-458, 94 S.Ct. 2547]; People v. Green (1991) 227 Cal.App.3d 692, 696 [278 Cal.Rptr. 140].) However, in some cases, a defendant may make a facial challenge to the statute, if he argues that the statute improperly prohibits a “ ‘substantial amount of constitutionally protected conduct,’ ” whether or not its application to his own conduct may be constitutional. (Kolender v. Lawson (1983) 461 U.S. 352, 358-359, fn. 8 [75 L.Ed.2d 903, 909-910, 103 S.Ct. 1855].)15
The Zuckemick petitioners argued in support of their demurrers that the ordinance failed to give fair and adequate notice of prohibited conduct, had *1096vague enforcement standards which encourage arbitrary and discriminatory arrests and convictions, and reached constitutionally protected conduct. The vagueness aspect of their challenge to the ordinance is governed by the rule stated in In re Cregler, supra, 56 Cal.2d 308, 313. The last ground, an overbreadth, not a vagueness, argument, is governed by Kolender v. Lawson, supra, 461 U.S. 352, 358-359, fn. 8 [75 L.Ed.2d 903, 909-910].)
The Zuckemick petitioners’ vagueness challenge was addressed to the terms “camp,” “camp facilities,” and “camp paraphernalia,” as defined in the ordinance, and the term “temporary shelter,” which is not defined. The definitions in the ordinance include terms which those petitioners do not claim are vague and which may apply to petitioner’s conduct. Thus the People may seek to establish violation of the ordinance on the basis that one or more of the petitioners pitched or used a tent on a public street or parking lot. Because the Zuckemick challenge to the ordinance was brought by demurrer and the nature of their conduct has not been determined, those petitioners cannot show at this stage of the proceedings that the ordinance did not clearly apply to their conduct. To that extent, therefore, the vagueness challenge of the Zuckemick petitioners is premature.
The Tobe plaintiffs are not persons presently charged with violating the ordinance, however. Their actions do not seek to avoid prosecution for criminal acts. They are suing as taxpayers to restrain expenditure of public funds on the enforcement of an allegedly unconstitutional ordinance. (Code Civ. Proc., § 526a.) The restrictions applicable to vagueness challenges by criminal defendants do not apply to their action.
With these considerations in mind, we now turn to the constitutional bases for the decision of the Court of Appeal.
Ill
Facial Validity of the Santa Ana Ordinance
A. Right to Travel.
Although no provision of the federal Constitution expressly recognizes a right to travel among and between the states, that right is recognized *1097as a fundamental aspect of the federal union of states. “For all the great purposes for which the Federal government was formed, we are one people, with one common country. We are all citizens of the United States; and, as members of the same community, must have the right to pass and repass through every part of it without interruption, as freely as in our own States.” (Passenger Cases (1849) 48 U.S. (7 How.) 283, 492 [12 L.Ed. 702, 791] (dis. opn. of Taney, C. J.).)
In the Passenger Cases, supra, 48 U.S. 283, the court struck down taxes imposed by the States of New York and Massachusetts on aliens who entered the state from other states and countries by ship. The basis for the decision, as found in the opinions of the individual justices, was that the tax invaded the power of Congress over foreign and interstate commerce. The opinion of Chief Justice Taney, in which he disagreed with the majority on the commerce clause issue, also addressed the tax as applied to citizens of the United States arriving from other states. That tax he believed to be impermissible. Some later decisions of the court trace recognition of the constitutional right of unburdened interstate travel to that opinion. (See, e.g., Shapiro v. Thompson (1969) 394 U.S. 618, 630 [22 L.Ed.2d 600, 612-613, 89 S.Ct. 1322].) And, relying on the dissenting opinion of the Chief Justice in the Passenger Cases, the court struck down a tax on egress from the State of Nevada in Crandall v. Nevada (1867) 73 U.S. (6 Wall.) 35 [18 L.Ed. 745], holding that the right of interstate travel was a right of national citizenship which was essential if a citizen were to be able to pass freely through another state to reach the national or a regional seat of the federal government.
Other cases find the source of the right in the privileges and immunities clause. In Paul v. Virginia (1868) 75 U.S. (8 Wall.) 168 [19 L.Ed. 357], the court rejected a challenge predicated on the privileges and immunities clause made by a corporation to a tax imposed by the State of Virginia on out-of-state insurance companies. In so doing, it recognized interstate travel as a right guaranteed to citizens. “It was undoubtedly the object of the clause in question to place the citizens of each State upon the same footing with citizens of other States, so far as the advantages resulting from citizenship in those States are concerned. It relieves them from the disabilities of alienage in other States; it inhibits discriminating legislation against them by other States; it gives them the right of free ingress into other States, and egress from them, it insures to them in other States the same freedom possessed by the citizens of those States in the acquisition and enjoyment of property and in the pursuit of happiness; and it secures to them in other States the equal protection of their laws.” (Id. at p. 180 [19 L.Ed at p. 360], italics added.)
In the Slaughter-House Cases (1872) 83 U.S. (16 Wall.) 36 [21 L.Ed. 394], the court equated the rights protected by the privileges and immunities
*1098clause to those in the corresponding provision of the Articles of Confederation which provided that the inhabitants of each state were to have “ ‘the privileges and immunities of free citizens in the several States; and the people of each State shall have free ingress and regress to and from any other State (83 U.S. at p. 75 [21 L.Ed. at p. 408].)
The privileges and immunities clause was also the source of the right of interstate travel as an incident of national citizenship recognized by the court in Twining v. New Jersey (1908) 211 U.S. 78, 97 [53 L.Ed. 97,105, 29 S.Ct. 14] and United States v. Wheeler (1920) 254 U.S. 281, 293 [65 L.Ed. 270, 273, 41 S.Ct. 133]. In Williams v. Fears (1900) 179 U.S. 270, 274 [45 L.Ed. 186, 188-189, 21 S.Ct. 128], the right was held to be one protected by the Fourteenth Amendment as well as other provisions of the Constitution. “Undoubtedly the right of locomotion, the right to remove from one place to another according to inclination, is an attribute of personal liberty, and the right, ordinarily, of free transit from or through the territory of any State is a right secured by the Fourteenth Amendment and by other provisions of the Constitution.” (Ibid.) Again, in Kent v. Dulles (1958) 357 U.S. 116, 127 [2 L.Ed.2d 1204,1211, 78 S.Ct. 1113], freedom to travel was recognized as “an important aspect of the citizen’s ‘liberty.’ ” (See also Edwards v. California (1941) 314 U.S. 160, 177, 183 [86 L.Ed. 119, 127, 62 S.Ct. 164] (conc, opns. of Douglas, J. and Jackson, J.).)
The right to travel, or right of migration, now is seen as an aspect of personal liberty which, when united with the right to travel, requires “that all citizens be free to travel throughout the length and breadth of our land uninhibited by statutes, rules, or regulations which unreasonably burden or restrict this movement.” (Shapiro v. Thompson, supra, 394 U.S. 618, 629 [22 L.Ed.2d 600, 612]; see also United States v. Guest (1966) 383 U.S. 745, 757-758 [16 L.Ed.2d 239, 248-250, 86 S.Ct. 1170].)
In a line of cases originating with Shapiro v. Thompson, supra, 394 U.S. 618, the court has considered the right to travel in the context of equal protection challenges to state laws creating durational residency requirements as a condition to the exercise of a fundamental right or receipt of a state benefit. In those cases the court has held that a law which directly burdens the fundamental right of migration or interstate travel is constitutionally impermissible. Therefore a state may not create classifications which, by imposing burdens or restrictions on newer residents which do not apply to all residents, deter or penalize, migration of persons who exercise their right to travel to the state.
In Shapiro, where public assistance was denied residents who had lived in the state for less than one year, the court held that durational residence as a *1099condition of receiving public assistance constituted invidious discrimination between residents, and that if a law had no other purpose than chilling the exercise of a constitutional right such as that of migration of needy persons into the state the law was impermissible. (Shapiro v. Thompson, supra, 394 U.S. 618, 627, 631 [22 L.Ed.2d 600, 613].) Further, “any classification which serves to penalize the exercise of [the right of migration], unless shown to be necessary to promote a compelling governmental interest, is unconstitutional.” (Id. at p. 634 [22 L.Ed.2d at p. 615].)
Next, durational residence requirements for voting were struck down by the court in Dunn v. Blumstein (1972) 405 U.S. 330 [31 L.Ed.2d 274, 92 S.Ct. 995]. Again the question arose as an equal protection issue. The court held that the state must have a compelling reason for the requirement because it denied residents the right to vote, a fundamental political right, and because the law “classifies] . . . residents on the basis of recent travel, penalizing those persons . . . who have gone from one jurisdiction to another during the qualifying period. Thus, the durational residence requirement directly impinges on the exercise of a second fundamental personal right, the right to travel.” (Id. at p. 338 [31 L.Ed.2d at pp. 281-282].) The court emphasized the imposition of a “direct” burden on travel: “Obviously, durational residence laws single out the class of bona fide state and county residents who have recently exercised this constitutionally protected right, and penalize such travelers directly.” (Ibid.) It also took care to point out, as it had in Shapiro v. Thompson, supra, 394 U.S. 618, 638, fn. 21 [22 L.Ed.2d 600, 617]), that a law which did not penalize residents on the basis of recent travel would not be vulnerable to a similar challenge. The court explained: “Where, for example, an interstate migrant loses his driver’s license because the new State has a higher age requirement, a different constitutional question is presented. For in such a case, the new State’s age requirement is not a penalty imposed solely because the newcomer is a new resident; instead, all residents, old and new, must be of a prescribed age to drive.” (405 U.S. at p. 342, fn. 12 [31 L.Ed.2d at p. 284].)
The court’s focus on whether the law directly burdened, by penalizing, interstate travel continued in Memorial Hospital v. Maricopa County (1974) 415 U.S. 250 [39 L.Ed.2d 306, 94 S.Ct. 1076], in which a durational residence requirement for indigent, nonemergency medical care at county expense was challenged. The court held that the restriction denied newcomers equal protection, impinged on the right to travel by denying basic necessities of life, and penalized interstate migration. (Id. at pp. 261-262 [39 L.Ed.2d at pp. 316-317]; see also Benson v. Arizona State Bd. of Dental Examiners (9th Cir. 1982) 673 F.2d 272, 277 [licensing requirement that did not disadvantage newcomers vis-á-vis previous residents did not penalize exercise of right to travel].)
*1100In each of these cases the court had before it a law which denied residents a fundamental constitutional right (voting) or a governmental benefit (public assistance, medical care) on the basis of the duration of their residence. The law created two classes of residents. In Zobel v. Williams (1982) 457 U.S. 55 [72 L.Ed.2d 672, 102 S.Ct. 2309], where the right to share in oil revenues was based on the duration of residence in Alaska, the court noted that the right to travel analysis in those cases, which did not create an actual barrier to travel, was simply a type of equal protection analysis. “In addition to protecting persons against the erection of actual barriers to interstate movement, the right to travel, when applied to residency requirements, protects new residents of a state from being disadvantaged because of their recent migration or from otherwise being treated differently from longer term residents. In reality, right to travel analysis refers to little more than a particular application of equal protection analysis. Right to travel cases have examined, in equal protection terms, state distinctions between newcomers and longer term residents.” (Id. at p. 60, fn. 6 [72 L.Ed.2d at pp. 677-678].)
The right of intrastate travel has been recognized as a basic human right protected by article I, sections 7 and 24 of the California Constitution. (In re White (1979) 97 Cal.App.3d 141 [158 Cal.Rptr. 562].) There the court concluded that a condition of probation which barred a defendant convicted of prostitution from designated areas in the City of Fresno should be modified to avoid an overly restrictive impact on the defendant’s right to travel. The court held that “the right to intrastate travel (which includes intramunicipal travel) is a basic human right protected by the United States and California Constitutions as a whole. Such a right is implicit in the concept of a democratic society and is one of the attributes of personal liberty under common law. (See 1 Blackstone, Commentaries 134; U.S. Const., art. IV, § 2 and the 5th, 9th and 14th Amends.; Cal. Const., art. I, § 7, subd. (a) and art. I, § 24 . . . .)” (Id. at p. 148.) In White, as in the early United States Supreme Court cases, the court addressed a direct burden on travel.
Neither the United States Supreme Court nor this court has ever held, however, that the incidental impact on travel of a law having a purpose other than restriction of the right to travel, and which does not discriminate among classes of persons by penalizing the exercise by some of the right to travel, is constitutionally impermissible.
By contrast, in a decision clearly relevant here, a zoning law which restricted occupancy to family units or nonfamily units of no more than two persons was upheld by the Supreme Court, notwithstanding any incidental impact on a person’s preference to move to that area, because the law was *1101not aimed at transients and involved no fundamental right. (Village of Belle Terre v. Boraas (1974) 416 U.S. 1, 7 [39 L.Ed.2d 797, 803, 94 S.Ct. 1536].)
Courts of this state have taken a broader view of the right of intrastate travel, but have found violations only when a direct restriction of the right to travel occurred. (Adams v. Superior Court (1974) 12 Cal.3d 55, 61-62 [115 Cal.Rptr. 247, 524 P.2d 375].) In In re White, supra, the petitioner had been barred directly from traveling to specified areas. In In re Marriage of Fingert (1990) 221 Cal.App.3d 1575 [271 Cal.Rptr. 389], a parent had been ordered to move to another county as a condition of continued custody of a child. Indirect or incidental burdens on travel resulting from otherwise lawful governmental action have not been recognized as impermissible infringements of the right to travel and, when subjected to an equal protection analysis, strict scrutiny is not required. If there is any rational relationship between the purpose of the statute or ordinance and a legitimate government objective, the law must be upheld. (Adams v. Superior Court, supra, 12 Cal.3d 55, 61-62.)
This court has also rejected an argument that any legislation that burdens the right to travel must be subjected to strict scrutiny and sustained only if a compelling need is demonstrated. In Associated Home Builders etc., Inc. v. City of Livermore (1976) 18 Cal.3d 582 [135 Cal.Rptr. 41, 557 P.2d 473, 92 A.L.R.3d 1038], an initiative ordinance which banned issuance of new building permits until support facilities were available was challenged as an impermissible burden on the right to travel. We rejected the argument because the impact of the ordinance was only an indirect burden on the right to travel. The ordinance did not penalize travel and resettlement, although an incidental impact was to make it more difficult to establish residence in the place of one’s choosing. (Id. at pp. 602-603; see also R.H. Macy & Co. v. Contra Costa County (1990) 226 Cal.App.3d 352, 367-369 [276 Cal.Rptr. 530].)
We do not question the conclusion of the Court of Appeal that a local ordinance which forbids sleeping on public streets or in public parks and other public places may have the effect of deterring travel by persons who are unable to afford or obtain other accommodations in the location to which they travel. Assuming that there may be some state actions short of imposing a direct barrier to migration or denying benefits to a newly arrived resident which violate the right to travel, the ordinance does not do so. It is a nondiscriminatory ordinance which forbids use of the public streets, parks, and property by residents and nonresidents alike for purposes other than those for which the property was designed. It is not constitutionally invalid because it may have an incidental impact on the right of some persons to interstate or intrastate travel.
*1102As we have pointed out above, to succeed in a facial challenge to the validity of a statute or ordinance the plaintiff must establish that “ ‘the act’s provisions inevitably pose a present total and fatal conflict with applicable constitutional provisions.’ ” (Arcadia Unified School Dist. v. State Dept, of Education, supra, 2 Cal.4th 251, 267, quoting Pacific Legal Foundation v. Brown, supra, 29 Cal.3d 168, 180-181.) All presumptions favor the validity of a statute. The court may not declare it invalid unless it is clearly so. (Calfarm Ins. Co. v. Deukmejian (1989) 48 Cal.3d 805, 814-815 [258 Cal.Rptr. 161, 771 P.2d 1247].)
Since the Santa Ana ordinance does not on its face reflect a discriminatory purpose, and is one which the city has the power to enact, its validity must be sustained unless it cannot be applied without trenching upon constitutionally protected rights. The provisions of the Santa Ana ordinance do not inevitably conflict with the right to travel. The ordinance is capable of constitutional application. The ordinance prohibits “any person” from camping and/or storing personal possessions on public streets and other public property. It has no impact, incidental or otherwise, on the right to travel except insofar as a person, homeless or not, might be discouraged from traveling to Santa Ana because camping on public property is banned. An ordinance that bans camping and storing personal possessions on public property does not directly impede the right to travel. (People v. Scott (1993) 20 Cal.App.4th Supp. 5, 13 [26 Cal.Rptr.2d 179].) Even assuming that the ordinance may constitute an incidental impediment to some individuals’ ability to travel to Santa Ana, since it is manifest that the ordinance is capable of applications which do not offend the Constitution in the manner suggested by petitioners and the Court of Appeal, the ordinance must be upheld.
Our conclusion that the Santa Ana ordinance does not impermissibly infringe on the right of the homeless, or others, to travel, finds support in the decision of the United States District Court in Joyce v. City and County of San Francisco (N.D.Cal. 1994) 846 F.Supp. 843. The plaintiffs, on behalf of a class of homeless individuals, sought a preliminary injunction to prevent implementation of a program of enforcement (the Matrix Program) of state and municipal laws which were commonly violated by the homeless residents of the city. Among the laws to be enforced were those banning “camping” or “lodging” in public parks and obstructing sidewalks. It was claimed, inter alia, that the Matrix Program infringed on the right to travel. The court rejected that argument and refused to require the city to show a compelling state interest to justify any impact the program might have on the right of the class members to travel. It noted that the program was not facially discriminatory as it did not distinguish between persons who were *1103residents of the city and those who were not. In so doing, the court suggested that the opinion of the Court of Appeal in this case was among those which constituted extensions of the right to travel that appeared to be “unwarranted under the governing Supreme Court precedent.” (Id. at p. 860.) We agree.
The right to travel does not, as the Court of Appeal reasoned in this case, endow citizens with a “right to live or stay where one will.” While an individual may travel where he will and remain in a chosen location, that constitutional guaranty does not confer immunity against local trespass laws and does not create a right to remain without regard to the ownership of the property on which he chooses to live or stay, be it public or privately owned property.
Moreover, lest we be understood to imply that an as applied challenge to the ordinance might succeed on the right to travel ground alone, we caution that, with few exceptions,16 the creation or recognition of a constitutional right does not impose on a state or governmental subdivision the obligation to provide its citizens with the means to enjoy that right. (Harris v. McRae (1980) 448 U.S. 297, 317-318 [65 L.Ed.2d 784, 804-806, 100 S.Ct. 2671]; Maher v. Roe (1977) 432 U.S. 464, 471-474 [53 L.Ed.2d 484, 492-495, 97 S.Ct. 2376].) Santa Ana has no constitutional obligation to make accommodations on or in public property available to the transient homeless to facilitate their exercise of the right to travel. (Lindsey v. Normet (1972) 405 U.S. 56, 74 [31 L.Ed.2d 36, 50-51, 92 S.Ct. 862].) Petitioners’ reliance on Clark v. Community for Creative Non-Violence (1984) 468 U.S. 288 [82 L.Ed.2d 221, 104 S.Ct. 3065], for the proposition that Santa Ana is obliged to provide areas in which camping is permitted on public property is misplaced. The issue in Clark was whether the refusal of the National Park Service to permit demonstrators who wished to call attention to the plight of the homeless to sleep in Lafayette Park and on the Mall in the nation’s capital violated the First Amendment rights of the demonstrators. The court held that it did not, as other areas were available for the purpose. Clark dealt with an affirmative right—that of free speech —which could be restricted in public fora only by reasonable, content-neutral time, place and manner restrictions. (Id. at p. 293 [82 L.Ed.2d at p. 293-294].) The court expressly recognized the authority of the National Park Service “to promulgate rules and regulations for the use of the parks in *1104accordance with the purposes for which they were established.”17 (468 U.S. at p. 289 [82 L.Ed.2d at p. 224].) Petitioners in this case make no claim that the right they seek, to camp on public property in Santa Ana, is expressive conduct protected by the First Amendment. There is no comparable constitutional mandate that sites on public property be made available for camping to facilitate a homeless person’s right to travel, just as there is no right to use public property for camping or storing personal belongings.18
The Court of Appeal erred in holding that the Santa Ana ordinance impermissibly infringes on the right of the homeless to travel.
B. Punishment for Status.
The Court of Appeal invalidated the ordinance for the additional reason that it imposed punishment for the “involuntary status of being homeless.”19 On that basis the court held the ordinance was invalid because such punishment violates the Eighth Amendment prohibition of cruel and unusual punishment, and the ban on cruel or unusual punishment of article I, section, 17 of the California Constitution. We disagree with that construction of the ordinance and of the activity for which punishment is authorized. The ordinance permits punishment for proscribed conduct, not punishment for status.
The holding of the Court of Appeal is not limited to the face of the ordinance, and goes beyond even the evidence submitted by petitioners. Neither the language of the ordinance nor that evidence supports a conclusion that a person may be convicted and punished under the ordinance solely *1105on the basis that he or she has no fixed place of abode. No authority is cited for the proposition that an ordinance which prohibits camping on public property punishes the involuntary status of being homeless or, as the Court of Appeal also concluded, is punishment for poverty. Robinson v. California (1962) 370 U.S. 660 [8 L.Ed.2d 758, 82 S.Ct. 1417], on which the court relied, dealt with a statute which criminalized the status of being addicted to narcotics. The court made it clear, however, that punishing the conduct of using or possessing narcotics, even by an addict, is not impermissible punishment for status. (370 U.S. at pp. 664, 666 [8 L.Ed.2d at pp. 761-763].)
A plurality of the high court reaffirmed the Robinson holding in Powell v. Texas (1968) 392 U.S. 514 [20 L.Ed.2d 1254, 88 S.Ct. 2145], where it rejected a claim that punishment of an alcoholic for being drunk in public was constitutionally impermissible. “The entire thrust of Robinson’s interpretation of the Cruel and Unusual Punishment Clause is that criminal penalties may be inflicted only if the accused has committed some act, has engaged in some behavior, which society has an interest in preventing, or perhaps in historical common law terms, has committed some actus reus. It thus does not deal with the question of whether certain conduct cannot constitutionally be punished because it is, in some sense, ‘involuntary’ or ‘occasioned by a compulsion.’ ” (Id. at p. 533 [20 L.Ed.2d at p. 1268].)
As the district court observed in Joyce v. City and County of San Francisco, supra, 846 F.Supp. 843, 857, the Supreme Court has not held that the Eighth Amendment prohibits punishment of acts derivative of a person’s status. Indeed, the district court questioned whether “homelessness” is a status at all within the meaning of the high court’s decisions. “As an analytical matter, more fundamentally, homelessness is not readily classified as a ‘status.’ Rather, as expressed for the plurality in Powell by Justice Marshall, there is a ‘substantial definitional distinction between a “status” . . . and a “condition” . . . .’ 392 U.S. at 533, 88 S.Ct. at 2155. While the concept of status might elude perfect definition, certain factors assist in its determination, such as the involuntariness of the acquisition of that quality (including the presence or not of that characteristic at birth), see Robinson, 370 U.S. at 665-69 & [fn.] 9, 82 S.Ct. at 1420-21 & [fn.] 9, and the degree to which an individual has control over that characteristic.” (846 F.Supp. at p. 857.)
The declarations submitted by petitioners in this action demonstrate the analytical difficulty to which the Joyce court referred. Assuming arguendo the accuracy of the declarants’ descriptions of the circumstances in which they were cited under the ordinance, it is far from clear that none had alternatives to either the condition of being homeless or the conduct that led to homelessness and to the citations.
*1106The Court of Appeal erred, therefore, in concluding that the ordinance is invalid because it permits punishment for the status of being indigent or homeless.
C. Vagueness and Overbreadth.
The Court of Appeal concluded that the ordinance was vague and over-broad. It based its vagueness conclusion on the nonexclusive list of examples of camping “paraphernalia” and “facilities” in the definitions of those terms. Those definitions were so unspecific, the court reasoned, that they invited arbitrary enforcement of the ordinance in the unfettered discretion of the police. The overbreadth conclusion was based on reasoning that the ordinance could be applied to constitutionally protected conduct. In that respect the court held that the verb “store” was overbroad as it could be applied to innocent conduct such as leaving beach towels unattended at public pools and wet umbrellas in library foyers.
1.
Vagueness.
The Tobe respondents and the People, real party in interest in the Zuckemick matter, argue that the Court of Appeal failed to apply the tests enunciated by the United States Supreme Court and this court in applying the vagueness doctrine. It has isolated particular terms rather than considering them in context. We agree.
A penal statute must define the offense with sufficient precision that “ordinary people can understand what conduct is prohibited and in a manner that does not encourage arbitrary and discriminatory enforcement.” (Kolender v. Lawson, supra, 461 U.S. 352, 357 [75 L.Ed.2d 903, 909]; see also Papachristou v. City of Jacksonville (1972) 405 U.S. 156, 162 [31 L.Ed.2d 110, 115-116, 92 S.Ct. 839]; United States v. Harriss (1954) 347 U.S. 612, 617 [98 L.Ed. 989, 996, 74 S.Ct. 808]; Thornhill v. Alabama (1940) 310 U.S. 88, 97-98 [84 L.Ed. 1093, 1099-1100, 60 S.Ct. 736].) “The constitutional interest implicated in questions of statutory vagueness is that no person be deprived of ‘life, liberty, or property without due process of law,’ as assured by both the federal Constitution (U.S. Const., Amends. V, XIV) and the California Constitution (Cal. Const., art. I, § 7).” (Williams v. Garcetti (1993) 5 Cal.4th 561, 567 [20 Cal.Rptr.2d 341, 853 P.2d 507].)
To satisfy the constitutional command, a statute must meet two basic requirements: (1) The statute must be sufficiently definite to provide adequate notice of the conduct proscribed; and (2) the statute must provide sufficiently definite guidelines for the police in order to prevent arbitrary and
*1107discriminatory enforcement. (Williams v. Garcetti, supra, 5 Cal.4th 561, 567; Walker v. Superior Court (1988) 47 Cal.3d 112, 141 [253 Cal.Rptr. 1, 763 P.2d 852]; People v. Superior Court (Caswell) (1988) 46 Cal.3d 381, 389-390 [250 Cal.Rptr. 515, 758 P.2d 1046].) Only a reasonable degree of certainty is required, however. (46 Cal.3d at p. 391.) The analysis begins with “the strong presumption that legislative enactments ‘must be upheld unless their unconstitutionality clearly, positively, and unmistakably appears. [Citations.] A statute should be sufficiently certain so that a person may know what is prohibited thereby and what may be done without violating its provisions, but it cannot be held void for uncertainty if any reasonable and practical construction can be given to its language.’ ” (Walker v. Superior Court, supra, 47 Cal.3d at p. 143.)
The Court of Appeal erred in holding that the ordinance is unconstitutionally vague. The terms which the Court of Appeal considered vague are not so when the purpose clause of the ordinance is considered and the terms are read in that context as they should be. (Williams v. Garcetti, supra, 5 Cal.4th 561, 569; see also Clark v. Community for Creative Non-Violence, supra, 468 U.S. 288, 290-291 [82 L.Ed.2d 221, 224-226]; United States v. Musser (D.C. Cir. 1989) 873 F.2d 1513 [277 App.D.C. 256]; United States v. Thomas (D.C. Cir. 1988) 864 F.2d 188, 197-198 [274 App.D.C. 385]; ACORN v. City of Tulsa, Okl. (10th Cir. 1987) 835 F.2d 735, 744-745.) Contrary to the suggestion of the Court of Appeal, we see no possibility that any law enforcement agent would believe that a picnic in a public park constituted “camping” within the meaning of the ordinance or would believe that leaving a towel on a beach or an umbrella in a library constituted storage of property in violation of the ordinance.
The stated purpose of the ordinance is to make public streets and other areas readily accessible to the public and to prevent use of public property “for camping purposes or storage of personal property” which “interferes with the rights of others to use the areas for which they were intended.” No reasonable person would believe that a picnic in an area designated for picnics would constitute camping in violation of the ordinance. The ordinance defines camping as occupation of camp facilities, living temporarily in a camp facility or outdoors, or using camp paraphernalia. The Court of Appeal’s strained interpretation of “living,” reasoning that we all use public facilities for “living” since all of our activities are part of living, ignores the context of the ordinance which prohibits living not in the sense of existing, but dwelling or residing on public property. Picnicking is not living on public property. It does not involve occupation of “tents, huts, or temporary shelters” “pitched” on public property or residing on public property.
Nor is the term “store” vague. Accumulating or putting aside items, placing them for safekeeping, or leaving them in public parks, on public *1108streets, or in a public parking lot or other public area is prohibited by the ordinance. When read in light of the express purpose of the ordinance — to avoid interfering with use of those areas for the purposes for which they are intended — it is clear that leaving a towel on a beach, an umbrella in the public library, or a student backpack in a school, or using picnic supplies in a park in which picnics are permitted is not a violation of the ordinance.
Unlike the Court of Appeal, we do not believe that People v. Mannon (1989) 217 Cal.App.3d Supp. 1 [265 Cal.Rptr. 616], and People v. Davenport (1985) 176 Cal.App.3d Supp. 10 [222 Cal.Rptr. 736], which upheld application of similar ordinances, were wrongly decided.
In Mannon the appellate department rejected a claim that the defendants were not “camping” within the definition of a Santa Barbara city ordinance. The court reasoned: “There is nothing ambiguous about the meaning of the word ‘camp.’ The definition is ‘to pitch or occupy a camp . . . to live temporarily in a camp or outdoors.’ (Webster’s Third New Intern. Diet. (1965) p. 322.) The illustrations of the word ‘camp’ utilized in the municipal code do not vary the traditional meaning of that word, they merely supplement it. The illustrations are consistent with the ordinary meaning of the word, i.e., living temporarily in the outdoors. ... [A] reasonable person would understand ‘camp’ to mean to temporarily live or occupy an area in the outdoors, and would not be deceived or mislead by the undertaking of further explanation in the municipal code.” (217 Cal.App.3d at pp. Supp. 4-5.)
The ordinance is not vague. It gives adequate notice of the conduct it prohibits. It does not invite arbitrary or capricious enforcement. The superior court properly rejected that basis of the Tobe plaintiffs’ challenge to the ordinance. The Court of Appeal erred in reversing that judgment on that ground.
2. Overbreadth.
The Court of Appeal reasoned that the ordinance was broader than necessary since it banned camping on all public property. There is no such limitation on the exercise of the police power, however, unless an ordinance is vulnerable on equal protection grounds or directly impinges on a fundamental constitutional right.
If the overbreadth argument is a claim that the ordinance exceeds the police power of that city, it must also fail. There is no fundamental right to camp on public property; persons who do so are not a suspect classification; *1109and neither of the petitions claims that the ordinance is invidiously discriminatory on its face. The Legislature has expressly recognized the power of a city “to regulate conduct upon a street, sidewalk, or other public place or on or in a place open to the public” (Pen. Code, § 647c) and has specifically authorized local ordinances governing the use of municipal parks. (Pub. Resources Code, § 5193.) Adoption of the ordinance was clearly within the police power of the city, which may “make and enforce within its limits all local, police, sanitary, and other ordinances and regulations not in conflict with general laws.” (Cal. Const., art. XI, §7; Fisher v. City of Berkeley (1984) 37 Cal.3d 644, 676 [209 Cal.Rptr. 682, 693 P.2d 261]; Birkenfeld v. City of Berkeley, supra, 17 Cal.3d 129, 159-160.) As the more than 90 cities and the California State Association of Counties that have filed an amicus curiae brief in this court have observed, a city not only has the power to keep its streets and other public property open and available for the purpose to which they are dedicated, it has a duty to do so. (San Francisco Street Artists Guild v. Scott (1974) 37 Cal.App.3d 667, 674 [112 Cal.Rptr. 502].)
The Court of Appeal also failed to recognize that a facial challenge to a law on grounds that it is overbroad and vague is an assertion that the law is invalid in all respects and cannot have any valid application (Hoffman Estates v. Flipside, Hoffman Estates (1982) 455 U.S. 489, 494, fn. 5 [71 L.Ed.2d 362, 369, 102 S.Ct. 1186]), or a claim that the law sweeps in a substantial amount of constitutionally protected conduct. The concepts of vagueness and overbreadth are related, in the sense that if a law threatens the exercise of a constitutionally protected right a more stringent vagueness test applies. (Id. atp. 499 [71 L.Ed.2d at p. 372]; Kolenderv. Lawson, supra, 461 U.S. 352, 358-359, fn. 8 [75 L.Ed.2d 903, 909-910].)
Neither the Tobe plaintiffs nor the Zuckemick petitioners have identified a constitutionally protected right that is impermissibly restricted by application or threatened application of the ordinance. There is no impermissible restriction on the right to travel. There is no right to use of public property for living accommodations or for storage of personal possessions except insofar as the government permits such use by ordinance or regulation. Therefore, the ordinance is not overbroad, and is not facially invalid in that respect. It is capable of constitutional application.
Since the ordinance is not unconstitutionally overbroad, and the facial vagueness challenge must fail, the Court of Appeal erred in ordering dismissal of the complaints in the Zuckemick prosecution and enjoining enforcement of the ordinance.
*1110IV
Disposition
The judgment of the Court of Appeal is reversed.
Lucas, C. J., Kennard, J., Arabian, J., and George, J., concurred.
The Tobe petition for writ of mandate stated a cause of action based on an alleged violation of equal protection. The petition alleged in support of the equal protection claim only that the respondents had not and would not arrest nonhomeless persons who engaged in the same conduct for which the plaintiffs had been arrested. They offered no evidence to support that equal protection theory and did not argue an equal protection claim in the Court of Appeal or in this court. We deem that claim to have been abandoned. The Zuckemick petition did not make an equal protection claim.
Section 10-401 of the ordinance defines the terms;
“(a) Camp means to pitch or occupy camp facilities; to use camp paraphernalia.
“(b) Camp facilities include, but are not limited to, tents, huts, or temporary shelters.
“(c) Camp paraphernalia includes, but is not limited to, tarpaulins, cots, beds, sleeping bags, hammocks or non-city designated cooking facilities and similar equipment.
“(d) Park means the same as defined in section 31-1 of this Code.
“(e) Store means to put aside or accumulate for use when needed, to put for safekeeping, to place or leave in a location.
“(f) Street means the same as defined in section 1-2 of this Code.”
The Court of Appeal opinion recites that the appeal and the mandate petition had been consolidated. We find no order in the record consolidating the appeal of the Tobe parties and the mandate petition of the Zuckemick parties in that court, however. We deem the recital in the Court of Appeal opinion to be such an order.
The ordinance has been amended accordingly. That action is not disputed by the parties.
Although the Tobe petition is denominated a petition for writ of “Mandate/Prohibition,” prohibition lies only to restrain “the proceedings of any tribunal, corporation, board, or person exercising judicial functions, when such proceedings are without or in excess of the jurisdiction of such tribunal, corporation, board, or person.” (Code Civ. Proc., § 1102.) None of the named respondents exercises judicial functions in the enforcement of the ordinance. We consider the petition one for mandamus alone therefore. (Neal v. State of California (1960) 55 Cal.2d 11, 16 [9 Cal.Rptr. 607, 357 P.2d 839].)
Santa Ana did not offer evidence to rebut the declarants’ description of the circumstances in which they were cited for violating the ordinance, believing the declarations to be irrelevant to the issues raised by the petition.
We do not understand plaintiffs to be arguing that a person who chooses voluntarily to camp on public property has a constitutionally protected right to do so, or that it would be improper to cite and convict such persons for violating the ordinance.
Unlike the dissent, we cannot conclude that the city intends to enforce the ordinance against persons who have no alternative to “camping” or placing “camp paraphernalia” on public property. (Dis. opn., post, p. 1123, fn. 14.) A senior deputy district attorney expressed his opinion at oral argument before this court that a necessity defense might be available to “truly homeless” persons and said that prosecutorial discretion would be exercised.
Penal Code section 950:
“The accusatory pleading must contain:
“1. The title of the action, specifying the name of the court to which the same is presented, and the names of the parties;
“2. A statement of the public offense or offenses charged therein.”
Penal Code section 952: “In charging an offense, each count shall contain, and shall be sufficient if it contains in substance, a statement that the accused has committed some public offense therein specified. Such statement may be made in ordinary and concise language without any technical averments or any allegations of matter not essential to be proved. It may be in the words of the enactment describing the offense or declaring the matter to be a public offense, or in any words sufficient to give the accused notice of the offense of which he is accused. In charging theft it shall be sufficient to allege that the defendant unlawfully took the labor or property of another.”
We assume, and respondents do not contend otherwise, that if a statute under which a defendant is charged with a crime is invalid, the complaint is subject to demurrer under subdivisions 1, 4 and 5 of Penal Code section 1004 on the ground that the court lacks jurisdiction because the statute is invalid, the facts stated do not constitute a public offense, and the complaint contains matter which constitutes a legal bar to the prosecution. (See Dillon v. Municipal Court, supra, 4 Cal.3d 860, 865; In re Cregler (1961) 56 Cal.2d 308, 310 [14 Cal.Rptr. 289, 363 P.2d 305]; Mandel v. Municipal Court (1969) 276 Cal.App.2d 649, 652 [81 Cal.Rptr. 173].)
We do not agree with the Court of Appeal in People v. Jackson (1985) 171 Cal.App.3d 609, 615 [217 Cal.Rptr. 540], that grounds other than those specified in Penal Code section 1004 may be urged in support of a “common law demurrer” raising “constitutional and other attacks on the sufficiency of an accusatory pleading.” Penal Code section 1002 specifies: “The only pleading on the part of the defendant is either a demurrer or a plea.” Penal Code section 1004 specifies the grounds on which a demurrer may be made, and we have recognized that if a constitutional challenge is based on matters not appearing on the face of the accusatory pleading a demurrer will not lie. (In re Berry (1968) 68 Cal.2d 137, 146 [65 Cal.Rptr. 273, 436 P.2d 273].)
The allegations charging violation of the ordinance recited only that: “On or about [date] said defendant, in violation of Section 10-402 of the Santa Ana Municipal Code, a Misdemeanor, did willfully and unlawfully, camp, use camp facilities, or camp paraphernalia in a public street or a public parking lot or other public area.”
Many of those issues are the result of legislative policy decisions. The arguments of many amici curiae regarding the apparently intractable problem of homelessness and the impact of the Santa Ana ordinance on various groups of homeless persons (e.g., teenagers, families with children, and the mentally ill) should be addressed to the Legislature and the Orange County Board of Supervisors, not the judiciary. Neither the criminal justice system nor the judiciary is equipped to resolve chronic social problems, but criminalizing conduct that is a product of those problems is not for that reason constitutionally impermissible. (See Sundance v. Municipal Court, supra, 42 Cal.3d 1101, and conc. opn. of Grodin, J., id. at p. 1139.)
While the Court of Appeal considered Santa Ana’s past actions and the documents suggesting that the city had mounted a concerted effort to remove homeless persons, it did not acknowledge that, as part of the settlement of a lawsuit seeking to enjoin further unlawful attempts to remove homeless persons, Santa Ana had agreed to take no further action to drive the homeless from the city. The Court of Appeal nonetheless assumed that the adoption of a facially neutral ordinance prohibiting camping and storing personal possessions on public property was a renewed effort to do so and a violation of the settlement agreement. Had it been a violation of the settlement agreement, however, the Tobe plaintiffs’ appropriate recourse would have been through an action to enforce the settlement.
We also decline to join the conclusion of the dissent that enactment of an ordinance like that adopted by Santa Ana, whose purpose is to preserve public property for its intended use, is constitutionally impermissible because it may lead to the adoption of similar ordinances in other cities with the result that the homeless are everywhere excluded from living on public property.
Because we conclude that the ordinance is not overbroad, we need not decide whether the overbreadth doctrine is applicable outside the area of freedoms protected by the First Amendment. The Supreme Court has stated that overbreadth challenges will be entertained *1096only if a First Amendment violation is alleged. “[0]utside the limited First Amendment context, a criminal statute may not be attacked as overbroad.” (Schall v. Martin (1984) 467 U.S. 253, 268, fn. 18 [81 L.Ed.2d 207, 220, 104 S.Ct. 2403].)
Other decisions of the United States Supreme Court suggest that this limitation is not invariably observed. (See Kolender v. Lawson, supra, 461 U.S. 352, 358-359, fn. 8 [75 L.Ed.2d 903, 909-910.) We will assume arguendo that the overbreadth doctrine may be applied outside the First Amendment context.
E.g., the right to counsel guaranteed by the Sixth Amendment to the United States Constitution.
The ordinance mirrors the National Park Service rules and regulations governing camping in several respects. Those rules prohibit camping by using park lands as living accommodations and storing personal belongings on them. (36 C.F.R. §§ 2.22, 2.61 (1994).)
Petitioners’ argument that Santa Ana may not deny homeless persons the right to live on public property anywhere in the city unless it provides alternative accommodations also overlooks the Legislature’s allocation of responsibility to assist destitute persons to counties. (Welf. & Inst. Code, §§ 17000-17001.5.) If the inability of petitioners and other homeless persons in Santa Ana to afford housing accounts for their need to “camp” on public property, their recourse lies not with the city, but with the county under those statutory provisions.
In reaching that decision, the Court of Appeal did not distinguish between involuntarily being homeless, and involuntarily engaging in conduct that violated the ordinance. The court assumed that an involuntarily homeless person who involuntarily camps on public property may be convicted or punished under the ordinance. That question, which the Court of Appeal and the dissent address, and which might be raised in an as applied challenge to the ordinance, is not before us because plaintiffs offered no evidence that the ordinance was being applied in that manner. We express no opinion on the proper construction of the ordinance, in particular on whether the conduct it prohibits must be “willful,” or on whether or in what circumstances a necessity defense is available.