
10 Cal.Rptr.3d 842 (2004)
116 Cal.App.4th 953
In re JOSE Z., a Person Coming Under the Juvenile Court Law.
The People, Plaintiff and Respondent,
v.
Jose Z., Defendant and Appellant.
No. F042747.
Court of Appeal, Fifth District.
March 10, 2004.
Review Denied June 9, 2004.
*844 Rex A. Williams, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Jo Graves, Assistant Attorney General, Carlos A. Martinez and Virna L. DePaul, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]

OPINION
WISEMAN, J.
The 2000 voter initiative known as Proposition 36 requires courts to place those convicted of nonviolent drug possession offenses on probation and in drug treatment programs and prohibits them from incarcerating these offenders. (Pen.Code, §§ 1210, 1210.1.) In this appeal, we address whether the juvenile court's failure to apply Proposition 36 to a minor violated the equal protection clauses of the Fourteenth Amendment to the United States Constitution or article I, section 7 of the California Constitution. We conclude that it did not because minors adjudged in violation of nonviolent drug possession offenses are not similarly situated to adults convicted of these offenses with respect to the legitimate purposes of the law. We also hold that the trial court properly stated the maximum term of confinement to be one year and four months under Welfare and Institutions Code section 726, subdivision (c). In the unpublished portion of this opinion, we determine that the trial court properly denied the minor's motion to suppress evidence.

PROCEDURAL HISTORY
On January 27, 2003, the People filed a juvenile wardship petition alleging that appellant Jose Z. (the minor) committed a misdemeanor violation of Health and Safety Code section 11550, subdivision (a), being under the influence of methamphetamine. The minor filed a motion based on the Fourth Amendment to suppress the evidence, which was denied. Subsequently, the minor admitted the allegations in the petition. While advising the minor of the consequences of his waiver of his right to a trial, the court stated that the maximum period of incarceration, if any, would be one year for the drug offense plus four months for a misdemeanor battery he had committed in 2001 and for which he had been on probation when he committed the drug offense.
The court conducted a disposition hearing on April 1, 2003. Observing that the minor had previously been adjudged a ward of the court (for the battery), the court readjudged him a ward and committed him to the Kings County Bravo Boot Camp Program for not less than 150 days and not more than one year. The court again stated that the maximum confinement time was one year and four months.
The minor appeals from the denial of the motion to suppress and the disposition imposed.


*845 FACTUAL HISTORY


A. The battery
On December 11, 2001, the minor, then age 15, joined with two other students at Liberty Middle School in attacking and beating Robert Y., another student. Later the same day, the three attackers and the victim were together in a program known as Opportunity Class. When the teacher briefly left the classroom, the three again attacked Robert. Robert's mother called the police, and Robert reported to the responding officer that the three attackers said they beat him because he had to be "jumped into" Opportunity Class. The police officer observed bruises on Robert's back, abdomen, and shoulders. When the officer contacted the minor, the minor admitted he had participated in the attacks.
On February 8, 2002, the People filed a juvenile wardship petition based on these facts. The petition alleged a violation of Penal Code section 243.2, subdivision (a), battery on school property. The probation report revealed that the minor was arrested twice before for the same offense, on May 29, 2000 and May 3, 2001. The first incident was disposed of with a warning; for the second, the minor served 16 hours in a work program. At a court appearance on March 12, 2002, the minor admitted the allegations in the petition. In addition, the probation report reflected that the minor admitted he occasionally used alcohol and marijuana and had associates and relatives who were Surenos gang members. He denied he was a member himself.
At the disposition hearing on April 22, 2002, the juvenile court adjudged the minor a ward and ordered him to serve 90 days in the Kings County Alpha Boot Camp Program. He served 79 days and was released on July 21, 2002. The minor remained on probation after his release, the court having placed him under the probation department's supervision, with a one-year review set for April 22, 2003.

B. The drug offense
At 1:00 o'clock in the morning on October 20, 2002, three months after his release from boot camp, the minor was riding in a pickup truck with three other young men. A deputy sheriff observed that there was a beaded necklace five to six inches long hanging from the rear-view mirror. Believing this to be a potential violation of Vehicle Code section 26708, subdivision (a), the deputy pulled the truck over. The cab of the truck contained beer bottles, open beer cans, and a loaded rifle. The deputy observed that the minor exhibited signs of intoxication, and the minor admitted to the deputy he had used methamphetamine. A blood sample taken from the minor prior to booking tested positive for methamphetamine. The deputy also found a glass pipe in the minor's pocket, which the minor stated he had used to smoke methamphetamine. Two rocks later proved to be methamphetamine were found under the seat of the patrol car in which the minor had been placed along with one of his companions. All four told the deputy that they were Surenos gang members.
As noted above, the wardship petition on the drug charge was filed on January 27, 2003. On March 26, 2003, the minor was cited a fourth time for fighting on school grounds. He was also seen waving a blue bandanna in front of his school. Blue is the color of the Surenos gang.

DISCUSSION

I. Application of Proposition 36 to minors tried in juvenile court
Proposition 36 added sections 1210, 1210.1, and 3063.1 to the Penal Code. (Prop. 36, approved Nov. 7, 2000, eff. July *846 1, 2001.) Section 1210.1, subdivision (a), of the Penal Code provides:
"Notwithstanding any other provision of law, and except as provided in subdivision (b), any person convicted of a nonviolent drug possession offense shall receive probation. As a condition of probation the court shall require participation in and completion of an appropriate drug treatment program.... A court may not impose incarceration as an additional condition of probation."
The term "nonviolent drug possession offense" includes the offense the minor was found to have committed, being under the influence of a controlled substance in violation of Health and Safety Code section 11550. (Pen.Code, § 1210, subd. (a).)
As can be seen, the statutory language only refers to those convicted, not those found to be offenders by a juvenile court, and the court did not apply Proposition 36 to the minor. The minor argues that the equal protection clause of the Fourteenth Amendment to the United States Constitution, and article I, section 7 of the California Constitution, require juvenile courts to apply Proposition 36 to minors found to have committed offenses within its scope. As a result, he concludes the court could not properly commit him to boot camp. On the other hand, the People argue that minors found in violation and adults convicted are not similarly situated for purposes of equal protection analysis. Further, the distinction the law makes would withstand equal protection scrutiny even if they were similarly situated.
As a threshold matter, we dispose of an argument the People make which, if correct, would enable us to avoid deciding this constitutional question. The People point out that when the court sustained the wardship petition on the drug charge and committed the minor to boot camp, the minor was on probation for a nondrug offense, i.e., battery on school property. Citing People v. Esparza (2003) 107 Cal.App.4th 691, 132 Cal.Rptr.2d 377, the People argue that even if the minor had been an adult convicted of being under the influence of a controlled substance, the court would have had the power to incarcerate him because he had violated probation imposed for a nondrug-related offense.
In Esparza, the defendant was on probation for felony vandalism when he pled guilty to possessing methamphetamine. The trial court revoked probation on the vandalism charge and imposed a previously suspended three-year sentence. The court also denied probation for the drug charge and sentenced the defendant to eight months for that offense, consecutive to the three-year sentence. On appeal, the defendant argued that he should not have received prison time for either offense because the probation violation that precipitated the imposition of both sentences was a nonviolent drug possession offense within the scope of Proposition 36. (People v. Esparza, supra, 107 Cal.App.4th at pp. 694-695, 132 Cal.Rptr.2d 377.)
The appellate court affirmed the sentences. It held that the court had the power to revoke probation and sentence the defendant to prison on the vandalism charge because Proposition 36 does not apply to drug-related probation violations where the underlying offense is not drug-related.[1] (People v. Esparza, supra, 107 *847 Cal.App.4th at pp. 697-698, 132 Cal.Rptr.2d 377.) Then, noting that Proposition 36 makes ineligible any drug program that is housed in a jail or prison, the court held that the court had the power to sentence the defendant to prison on the drug charge. The court reasoned that while in prison on the vandalism charge, the defendant would be unavailable to begin a Proposition 36 drug treatment program within the statutorily specified time period. (Id. at pp. 698-699, 132 Cal.Rptr.2d 377.)
Here, the People argue that an adult in the minor's situation could have been incarcerated despite Proposition 36 because he violated probation imposed for a nondrug-related offense, just as did the defendant in Esparza. Therefore, there is no difference between the court's treatment of the minor and the treatment an adult charged with the same offenses could have received. If this argument were correct, there would be no need to reach the equal protection issue.
The argument is unconvincing for two reasons. First, we cannot determine from the record whether any portion of the minor's 150-day-to-one-year boot camp commitment was for the underlying offense of battery. On the contrary, the transcript of the disposition hearing tends to indicate that the commitment was only for the drug offense since the battery is not mentioned at all. Consequently, we cannot conclude that the minor was committed for an offense outside the scope of Proposition 36.
Second, even if we reached this conclusion, we could not say the commitment for that offense would make the minor unavailable for a Proposition 36 treatment program because he was committed to a juvenile facility, not a jail or prison. The statute provides that eligible drug treatment programs "[do] not include drug treatment programs offered in a prison or jail facility," but it does not exclude programs at juvenile facilities. (Pen.Code, § 1210, subd. (b).) Thus, neither of the reasons for declining to apply Proposition 36 that the court relied on in Esparza apply here. As a result, we proceed to consider the constitutional issue.
The right to equal protection of the laws is guaranteed by the Fourteenth Amendment to the United States Constitution and by article I, section 7 of the California Constitution. The federal and state provisions are analyzed in essentially the same manner. (In re Demergian (1989) 48 Cal.3d 284, 291-292, 256 Cal.Rptr. 392, 768 P.2d 1069; People v. Leng (1999) 71 Cal.App.4th 1, 11, 83 Cal.Rptr.2d 433.) The right "is essentially a direction that all persons similarly situated should be treated alike" by state actors. (Cleburne v. Cleburne Living Center, Inc. (1985) 473 U.S. 432, 439, 105 S.Ct. 3249, 87 L.Ed.2d 313.)
In the first stage of an equal protection analysis, we determine whether the state has adopted a classification that affects similarly situated groups of people in an unequal manner. (People v. Massie (1998) 19 Cal.4th 550, 571, 79 Cal.Rptr.2d 816, 967 P.2d 29). The analysis will not proceed beyond this stage if the groups at issue are not "`similarly situated with respect to the legitimate purpose of the law,'" or if they are similarly situated, but receive "`like treatment.'" Identical treatment is not required. (Darces v. Woods (1984) 35 Cal.3d 871, 885, 201 Cal.Rptr. 807, 679 P.2d 458; People v. Hubbart (2001) 88 Cal.App.4th 1202, 1216-17, 106 Cal.Rptr.2d 490.)
*848 In this case, we conclude there is no violation of equal protection principles. The two groups at issue  "person[s] convicted of a nonviolent drug possession offense" in the words of Proposition 36, on the one hand, and persons adjudicated to have committed such an offense in juvenile court on the other[2]  are not similarly situated with respect to the purposes of the law. It is true, as the minor argues, that Proposition 36 seeks to rehabilitate those convicted of the subject offenses, just as the juvenile court law seeks to rehabilitate minors adjudged to be offenders in juvenile court. But the two groups are not similarly situated with respect to this common purpose.
In preserving juvenile court judges' discretion to incarcerate nonviolent juvenile drug offenders, while removing superior court judges' discretion to incarcerate nonviolent adult drug offenders, the law addresses itself to liberty interests that are qualitatively different. The California Supreme Court discussed this difference in In re Eric J. (1979) 25 Cal.3d 522, 159 Cal.Rptr. 317, 601 P.2d 549. In that case, the question was whether a maximum term of three years for a minor found by the juvenile court to have committed a burglary violated equal protection principles, when the maximum sentence for an adult convicted of the same offense was two years. In holding that there was no equal protection violation because minors adjudicated in violation and adults convicted of burglary are not similarly situated, the court explained:
"For purposes of this discussion, the most significant difference between minors and adults is that `[t]he liberty interest of a minor is qualitatively different than that of an adult, being subject both to reasonable regulation by the state to an extent not permissible with adults [citations], and to an even greater extent to the control of the minor's parents unless "it appears that the parental decisions will jeopardize the health or safety of the child or have a potential for significant social burdens." [Citation.]' [Citation.] When the minor must be removed from the custody of his parents for his own welfare or for the safety and protection of the public [citation], the state assuming the parents' role, the state also assumes the parents' authority to limit the minor's freedom of action." (In re Eric J., supra, 25 Cal.3d at p. 530, 159 Cal.Rptr. 317, 601 P.2d 549; see also In re Roger S. (1977) 19 Cal.3d 921, 141 Cal.Rptr. 298, 569 P.2d 1286 [no violation of equal protection principles in involuntary commitment of minor to state mental hospital at parent's request, despite absence of findings that would be required for involuntary commitment of adult].)
Here, the court removed the minor from his parents' custody and committed him to boot camp for purposes of rehabilitation. It did not violate equal protection principles in doing so because the minor's youth limits the scope of his liberty interest in that he may be confined for his own welfare *849 and for the safety and protection of the public.
The differing liberty interests the court described in Eric J. correspond to different needs of minors and adults, and these in turn relate to different means of rehabilitation provided by the law. Proposition 36 drug treatment programs include "outpatient treatment, half-way house treatment, narcotic replacement therapy, drug education or prevention courses and/or limited inpatient or residential drug treatment as needed to address special detoxification or relapse situations or severe dependence." (Pen.Code, § 1210, subd. (b).) These resources are considerable, but their rehabilitative purpose is different from that of the resources of the juvenile system. The juvenile court law provides, in part, regarding its purposes:
"The purpose of this chapter is to provide for the protection and safety of the public and each minor under the jurisdiction of the juvenile court and to preserve and strengthen the minor's family ties whenever possible, removing the minor from the custody of his or her parents only when necessary for his or her welfare or for the safety and protection of the public.... When the minor is removed from his or her own family, it is the purpose of this chapter to secure for the minor custody, care, and discipline as nearly as possible equivalent to that which should have been given by his or her parents. This chapter shall be liberally construed to carry out these purposes." (Welf. & Inst.Code, § 202, subd. (a), italics added.)
The state's ability to exercise the same power as a parent to limit the liberty of a minor who becomes a ward of the court is consistent with the state's responsibility to provide "custody, care and discipline" like that which should have been provided by the minor's parents. Equal protection principles do not prevent the state from taking on, with respect to minors, responsibilities that it does not have for adults. For example, the federal and state constitutions do not forbid the state to "secure for [a] minor custody, care and discipline as nearly as possible equivalent to that which should have been given by his or her parents." (Ibid.) This is especially true where, as here, the court finds that the custody, care and discipline will involve confinement  even though an adult would not be incarcerated for similar conduct.
In sum, the needs of adult and minor drug offenders are not the same. Quoting Justice Frankfurter, the California Supreme Court has observed that "`[t]he Constitution does not require things which are different in fact ... to be treated in law as though they were the same.' [Citation.]" (In re Eric J., supra, 25 Cal.3d at p. 530, fn. 1, 159 Cal.Rptr. 317, 601 P.2d 549.) We hold that not extending the benefits of Proposition 36 to minors does not violate the equal protection clause of the Fourteenth Amendment, or article I, section 7 of the California Constitution.

II. Maximum term of confinement
As noted earlier, the court stated in its commitment order that the maximum term of confinement would be one year and four months. The court's comments at the time the minor admitted the allegations in the petition indicate that one year was for the drug offense and four months was for the battery:
"THE COURT: Okay. It's one year on this offense [the drug offense, violation of Health and Safety Code section 11550]. It looks like he had a misdemeanor battery too, a 243.2 in April of 2000.[¶] ... [¶] In that case, it looks like it was a one-year misdemeanor.
"[The Deputy District Attorney]: That would be a one-year misdemeanor *850 if he was convicted, so that would add four months."
The addition of four months for the battery was pursuant to Penal Code section 1170.1, which provides that a felony sentence ordered to run consecutively to another sentence shall be one-third of the middle term imposed for the offense. This squares with the holding in In re Eric J., supra, 25 Cal.3d at p. 537, 159 Cal.Rptr. 317, 601 P.2d 549, that avoidance of absurd results requires a similar sentencing scheme for felonies and misdemeanors. Consequently, since the maximum sentence for a violation of Penal Code section 243.2 is one year, the maximum consecutive term for this offense would be one-third of that period, or four months.
The court included the maximum term of confinement in its order pursuant to subdivision (c) of section 726 of the Welfare and Institutions Code, which provided:
"In any case in which the minor is removed from the physical custody of his or her parent or guardian as the result of an order of wardship made pursuant to [Welfare and Institutions Code] Section 602, the order shall specify that the minor may not be held in physical confinement for a period in excess of the maximum term of imprisonment which could be imposed upon an adult convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court. [¶] ... [¶]
"If the charged offense is a misdemeanor or a felony not included within the scope of Section 1170 of the Penal Code, the `maximum term of imprisonment' is the longest term of imprisonment prescribed by law."
The minor argues that the court erred in two respects by ordering a maximum confinement time of one year and four months. First, he contends that, because an adult convicted of the same offenses would not, under Proposition 36, have received any time for the drug charge, the inclusion of time in his case violated equal protection principles. We reject this argument because, as explained earlier, there was no equal protection violation since the minor was differently situated from an adult convicted of the same nonviolent drug possession offense.
Second, the minor takes the position that the stated maximum confinement time of one year and four months violated the plain language of Welfare and Institutions Code section 726, subdivision (c): "[T]he order shall specify that the minor may not be held in physical confinement for a period in excess of the maximum term of imprisonment which could be imposed upon an adult convicted of the offense or offenses...." The minor argues that under Proposition 36, an adult convicted of violating Health and Safety Code section 11550 would not receive additional time. As a result, he reasons that, under Welfare and Institutions Code section 726, he should not either.
We disagree. The foundational premise upon which the minor builds his argument is faulty since it is not true that under Proposition 36 the maximum term of incarceration for an adult violator of Health and Safety Code section 11550 is zero. On the contrary, the sentence must be "not less than 90 days or more than one year in a county jail." (Health & Saf.Code, § 11550, subd. (a).) Under some circumstances, the diversion provisions of Proposition 36 do not apply, for example: the defendant was previously convicted of a violent felony (Pen.Code, § 1210.1, subd. (b)(1)); the defendant was convicted of a nondrug-related offense and a nonviolent drug possession offense in the same proceeding (Pen.Code, § 1210.1, subd. (b)(2)); the defendant *851 used a firearm while committing certain drug offenses (Pen.Code, § 1210.1, subd. (b)(3)); the defendant refuses drug treatment (Pen.Code, § 1210.1, subd. (b)(4)); or the defendant is found to be unamenable to drug treatment (Pen.Code, § 1210.1, subd. (b)(5)). Under other circumstances covered by Proposition 36, probation may be revoked and sentence imposed, including when the defendant is found to be unamenable to drug treatment (Pen.Code, § 1210.1, subd. (c)(2)); the defendant commits a nondrug-related probation violation (Pen.Code, § 1210.1, subd. (e)(1)); or the defendant commits a drug-related probation violation and certain other circumstances exist (Pen.Code, § 1210.1, subd. (e)(3)). Under all these situations, the maximum one-year term may be imposed on an adult offender.
Since a term of up to one year remains available under Proposition 36 for a violation of Health and Safety Code section 11550, we interpret Welfare and Institutions Code section 726 as allowing a one-year maximum period of confinement. For misdemeanors and felonies not included within Penal Code section 1170, Welfare and Institutions Code section 726 provides that "the `maximum term of imprisonment' is the longest term of imprisonment prescribed by law." (Welf. & Inst.Code, § 726, subd. (c).) Here, the law simply states that the longest term prescribed for the offense is to be set forth in the juvenile court's order as the maximum term of confinement. The longest term for a violation of Health and Safety section 11550 is one year. Thus, the plain language of the statute supports the court's action. "If there is no ambiguity in the language" of a statute we undertake to interpret, then "we presume the Legislature meant what it said, and the plain meaning of the statute governs." (Hunt v. Superior Court (1999) 21 Cal.4th 984, 1000, 90 Cal.Rptr.2d 236, 987 P.2d 705.)
In an abundance of caution, we observe that even if Welfare and Institutions Code section 726 was ambiguous, we would still reach the same conclusion. "[W]e consider portions of a statute in the context of the entire statute and statutory scheme of which it is a part, giving significance to every word, phrase, sentence, and part of an act in pursuance of the legislative purpose." (Curle v. Superior Court (2001) 24 Cal.4th 1057, 1063, 103 Cal.Rptr.2d 751, 16 P.3d 166.) Courts "should construe every statute with reference to the entire scheme of law of which it is part so that the whole may be harmonized and retain effectiveness." (Clean Air Constituency v. California State Air Resources Bd. (1974) 11 Cal.3d 801, 814, 114 Cal.Rptr. 577, 523 P.2d 617.)
Section 726 also contains a provision defining "maximum term of imprisonment" for felonies within the scope of the sentencing provisions of Penal Code section 1170:
"`[M]aximum term of imprisonment' means the longest of the three time periods set forth in paragraph [3] of subdivision (a) of Section 1170 of the Penal Code, but without the need to follow the provisions of subdivision (b) of Section 1170 of the Penal Code or to consider time for good behavior or participation pursuant to Sections 2930, 2931, and 2932 of the Penal Code, plus enhancements which must be proven if pled." (welf. & insT.codE, § 726, subd. (c).)
The referenced provisions of Penal Code section 1170 provide that where the statute gives the trial court a choice of three terms, the court shall impose the middle term unless it makes findings of mitigation or aggravation to support imposition of the lower or upper term. (Pen.Code, § 1170, subds. (a)(3) & (b).) Welfare and Institutions Code section 726 thus allows the *852 juvenile court to state a maximum term of confinement based on the upper term, but without finding aggravation.[3] In enacting this provision, the Legislature specified that the maximum term of imprisonment to be stated in the juvenile court's order for felonies within Penal Code section 1170 is simply the maximum sentence available under any circumstances.
Obviously, misdemeanor statutes do not contain three separate sentencing options as do Penal Code section 1170 felony statutes. As a result, under Welfare and Institutions Code section 726, in misdemeanors (like here) and non-Penal Code section 1170 felonies, the "maximum term of imprisonment" is nothing more than the longest term available.
We conclude that under Welfare and Institutions Code section 726, the juvenile court must specify that the maximum term of confinement for the misdemeanor is the longest potential sentence set forth in the statute defining the offense. Further, this may be done without referring to the circumstances that would have to exist before that sentence could be imposed on an adult offender. For these reasons, the court did not err in setting one year and four months as the maximum term of confinement for the two offenses committed by the minor.


III. Motion to suppress evidence[**]

DISPOSITION
The judgment is affirmed.
WE CONCUR: DIBIASO, Acting P.J., and GOMES, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part III.
[1]  The rule is different for parole violators. Penal Code section 3063.1, added by Proposition 36, provides that "parole may not be suspended or revoked for commission of a nonviolent drug possession offense or for violating any drug-related condition of parole." This applies even if the underlying offense is not drug-related. There is no comparable provision benefiting probation violators. (See People v. Esparza, supra, 107 Cal.App.4th at p. 697, fn. 5, 132 Cal.Rptr.2d 377.)
[2]  It is important to make this distinction, rather than referring to the two groups simply as adults and minors. This is because a minor committed to the Youth Authority after being tried and convicted as an adult may well be entitled to the same sentencing treatment as an adult under the guarantee of equal protection. (See People v. Olivas (1976) 17 Cal.3d 236, 131 Cal.Rptr. 55, 551 P.2d 375 [misdemeanant between the ages of 16 and 21 tried as adult and convicted may not be committed to the California Youth Authority for a term potentially longer than the longest term that can be imposed on a person over 21].) Further, Proposition 36 expressly covers "any person convicted of a nonviolent drug possession offense," and thus by its terms includes minors tried and convicted as adults. (Pen.Code, § 1210.1, subd. (a), italics added.)
[3]  Notably, in In re Eric J., supra, 25 Cal.3d 522, 159 Cal.Rptr. 317, 601 P.2d 549, the court held that there is no equal protection violation in allowing the juvenile court to disregard the requirement of an aggravation finding.
[**]   See footnote *, ante.
