
23 Cal.Rptr.3d 676 (2005)
126 Cal.App.4th 131
Mark E. OVERLAND et al., Petitioners,
v.
SUPERIOR COURT of Los Angeles County, Respondent;
The County of Los Angeles et al., Real Parties in Interest.
No. B175442.
Court of Appeal, Second District, Division Three.
January 28, 2005.
Review Denied May 11, 2005.
Certiorari Denied October 11, 2005.
*677 Overland Borenstein Scheper & Kim and Mark A. Borenstein for Petitioners.
No appearance for Respondent.
Morrison & Foerster, John W. Alden, Jr. and Cynthia L. Gillette, Los Angeles, for Real Parties in Interest.
Certiorari Denied October 11, 2005. See 126 S.Ct. 426.
KLEIN, P.J.
Petitioners Mark E. Overland (Overland), Overland & Borenstein LLP (O & B) and Pamela A. Poloski (Poloski) (collectively, petitioners) seek a writ of mandate directing respondent superior court to vacate its order sustaining a demurrer to their first cause of action without leave to amend and to enter an order overruling the demurrer.
The real parties in interest are the Los Angeles County Superior Court and John A. Clarke, the court's executive officer and clerk (clerk) (collectively, the court defendants).
The issue presented is whether the court defendants' refusal to pay the petitioners pre-exoneration interest on their cash bail deposits constitutes a taking of private property for public use for which petitioners are entitled to just compensation.
We conclude the court defendants' refusal to pay petitioners pre-exoneration interest on their cash bail deposits does not constitute a "taking" because there was no confiscation of private property by the *678 court defendants for a public purpose, or at all. Rather, when petitioners voluntarily deposited cash bail to free the criminal defendants from custody, petitioners entered into contracts with the government by which petitioners guaranteed the appearance of the criminal defendants released on bail at all required court proceedings. The terms of the contract did not include a provision for payment of pre-exoneration interest. Therefore, petitioners cannot state a claim based on the court defendants' refusal to pay such interest. The petition for writ of mandate is denied.

FACTUAL AND PROCEDURAL BACKGROUND

1. Background.

Overland posted cash bail in the amount of $500,000 by way of a cashier's check to secure the appearance of Abdul Aziz Mohd Alkhelaifi in People v. Alkhelaifi (Super. Ct. L.A. County, No. BA206456). The cash bail was posted with the Los Angeles County Sheriff's Department at the inmate reception center at the Los Angeles County Jail. The sheriff then transferred the $500,000 to the clerk, who deposited the bail money with the County's auditor-controller into the Los Angeles County TK7 Trust Fund on September 21, 2000.[1] On June 19, 2001, the $500,000 bail was exonerated by court order. On July 20, 2001, the clerk requested the auditor-controller to transfer the $500,000 from the TK7 Trust Fund to the clerk's "Special Trust Fund" for return of the cash bail to Overland. The auditor-controller effected the transfer on July 26, 2001. The clerk then wrote a check to Overland, which was mailed to him on August 3, 2001. When Overland received the $500,000, he made repeated requests for interest on the deposited money from the date Alkhelaifi's bail was posted to the day it was exonerated and from the date of exoneration to the date the money was returned to him. No interest was ever paid.
Pamela Poloski deposited cash bail on December 20, 2002, in the amount of $35,000 by way of cashier's check to secure the presence of Robert Poloski in People v. Robert Alan Poloski (Super.Ct.L.A.County, No. PA042651). The procedures followed in the Alkhelaifi case also were used in the Poloski action. On February 10, 2003, the complaint against Robert Poloski was dismissed and the $35,000 bail was exonerated. Poloski did not receive the $35,000 back until March 26, 2003. She received no interest on the bail deposit from the date she deposited the bail to the date the bail was exonerated, or from the date of exoneration to the date the money was actually returned to her.
O & B is a law firm which, on July 12, 2003, deposited cash bail in the amount of $250,000 by way of a cashier's check to secure the appearance of Leonard McSherry pending his appeal of a misdemeanor judgment entered against him in People v. Leonard James McSherry (Super.Ct.L.A.County, No. 3BH00547-01). The $250,000 bail was exonerated on July 25, 2003. The cash bail was returned to O & B on September 5, 2003, without interest.

2. Proceedings.

On September 26, 2003, all three petitioners filed a complaint against the court defendants and others[2] for "unlawful taking *679 without compensation; unjust enrichment; injunctive relief; declaratory relief and petition for writ of mandate to compel payment of interest." They brought the action on behalf of themselves and for all persons similarly situated.
The complaint's first cause of action pled an "unlawful taking of property without compensation against all defendants  interest earned between deposit and exoneration."
The second cause of action alleged an "unlawful taking of property without compensation against all defendants  interest earned between exoneration and return."
Additionally, the complaint pled a cause of action for unjust enrichment, and requested injunctive and declaratory relief, as well as a writ of mandate directing defendants to pay interest on cash bail deposits.
The court defendants filed a motion for judgment on the pleadings or, in the alternative, demurrers to all claims asserted against them in the complaint. The matter was heard in the Orange County Superior Court. On March 17, 2004, the trial court overruled the demurrer to the second cause of action (relating to post-exoneration interest), and otherwise sustained the demurrers without leave to amend. With regard to the first cause of action, for pre-exoneration interest, the trial court ruled Fresno Fire Fighters v. Jernagan (1986) 177 Cal.App.3d 403, 222 Cal.Rptr. 886 (Fresno) controlled and precluded an award of interest. As to the second cause of action, for post-exoneration interest on bail, the trial court determined the Fresno case did not control.[3]
Petitioners thereafter brought the instant petition for writ of mandate on March 24, 2004, seeking review of the trial court's order sustaining the demurrer to their first cause of action without leave to amend. We issued an order to show cause.

CONTENTIONS
Petitioners contend that in light of the United States Supreme Court's decisions in Phillips v. Washington Legal Foundation (1998) 524 U.S. 156, 118 S.Ct. 1925, 141 L.Ed.2d 174 (Phillips) and Brown v. Legal Foundation of Wash. (2003) 538 U.S. 216, 123 S.Ct. 1406, 155 L.Ed.2d 376 (Brown), the Court of Appeal's decision in Fresno, supra, 177 Cal.App.3d 403, 222 Cal.Rptr. 886, is no longer good law, and their first cause of action states a claim for an unconstitutional taking of pre-exoneration interest without just compensation.

DISCUSSION

1. Standard of appellate review.

In determining whether a plaintiff has properly stated a claim for relief, "our standard of review is clear: `"We treat the demurrer as admitting all material facts properly pleaded, but not contentions, deductions or conclusions of fact or law. [Citation.] We also consider matters which may be judicially noticed." [Citation.] Further, we give the complaint a reasonable interpretation, reading it as a whole and its parts in their context. [Citation.] When a demurrer is sustained, we determine whether the complaint states facts sufficient to constitute a cause of action. [Citation.] And when it is sustained without leave to amend, we decide whether there is a reasonable possibility that the defect can be cured by amendment: if it can be, the trial court has *680 abused its discretion and we reverse; if not, there has been no abuse of discretion and we affirm. [Citations.] The burden of proving such reasonable possibility is squarely on the plaintiff.' [Citations.]" (Zelig v. County of Los Angeles (2002) 27 Cal.4th 1112, 1126, 119 Cal.Rptr.2d 709, 45 P.3d 1171.) Our review is de novo. (Ibid.)

2. Pertinent case law.


a. Fresno held depositors are not entitled to the interest earned on cash bail deposits in criminal actions.

In Fresno, supra, 177 Cal.App.3d 403, 222 Cal.Rptr. 886, a firefighters association filed a class action on behalf of all public and private cash depositors in court proceedings to compel return of all interest earned on monies deposited with the courts of Fresno County. (Id. at p. 406, 222 Cal.Rptr. 886.) The lower court ruled the owners of all cash court deposits are entitled to the interest earned on the money. (Id. at p. 405, 222 Cal.Rptr. 886.)
The reviewing court affirmed the lower court's ruling concerning cash deposits in civil actions but reversed as to interest on cash bail deposits in criminal proceedings. (Fresno, supra, 177 Cal.App.3d at p. 406, 222 Cal.Rptr. 886.)
With respect to interest on cash deposits in civil actions, Fresno held such deposits are controlled by the superior court and that the superior court is the owner of any interest earned thereon, but the court's ownership is that of a trustee for the person who is ultimately entitled to receive the deposited money. (Fresno, supra, 177 Cal.App.3d at p. 409, 222 Cal.Rptr. 886.) Fresno concluded the owners of all cash deposits in civil actions within the three-year period before the filing of the firefighters' complaint were entitled to the interest earned on their monies while on deposit in the general fund of the county. (Ibid.)
On the other hand, with respect to interest earned on cash bail deposits in criminal actions, Fresno held the county's retention of interest accrued on such deposits "is not an unconstitutional taking of private property." (Fresno, supra, 177 Cal.App.3d at p. 413, 222 Cal.Rptr. 886.) Fresno reasoned that bail money is deposited for a public purpose, namely, securing a defendant's appearance, and the interest earned thereon is reasonably needed to support the court system. (Id., at p. 412, 222 Cal.Rptr. 886.)
Fresno explained, "[T]he California Legislature has declared that the interest earned on any bail money deposited in criminal proceedings may, if the board of supervisors so directs, be used by the county for the support of the courts of that county. (Gov.Code, § 53647.5.)[4] This is a reasonable need since the operation of the courts is essential to the `general welfare' of the people. Further, unlike cash deposits in civil cases . . . where the money is deposited only for the benefit of a private person or entity, bail money is deposited for a public purpose  security for the appearance of the defendant at all required court hearings. This arises because the public as well as the defendant is entitled to the orderly determination of the truth or falsity of the charges against the defendant. If the defendant fails to appear, the bail money is forfeited to the county to help defray the costs of apprehending the defendant. Since the public *681 has a vested interest in the defendant's appearance at all court hearings, it has a vested interest in the bail money deposited to secure that appearance. Hence, the public purpose of bail justifies the denial to the owner of the beneficial use of the money while it is on deposit with the court. [Citations.]" (Fresno, supra, 177 Cal.App.3d at p. 412, 222 Cal.Rptr. 886.)
Petitioners contend Fresno is no longer good law in that in Phillips, supra, 524 U.S. 156, 118 S.Ct. 1925, 141 L.Ed.2d 174, and Brown, supra, 538 U.S. 216, 123 S.Ct. 1406, 155 L.Ed.2d 376, the United States Supreme Court "overruled sub silentio, the legal underpinning of the Court of Appeal's decision in Fresno Fire Fighters v. Jernagan." We now turn to those cases.

b. Phillips held the interest earned on a lawyer's trust account is the private property of the client.

In Phillips, supra, 524 U.S. 156, 118 S.Ct. 1925, 141 L.Ed.2d 174, the plaintiffs challenged the constitutionality of the Texas Interest on Lawyers Trust Account (IOLTA) program. Under the IOLTA program, certain client funds held by an attorney in connection with his or her practice of law were deposited in bank accounts, with the resulting interest paid to foundations that finance legal services for low income individuals. (Phillips, at pp. 159-160, 118 S.Ct. 1925.) The plaintiffs alleged the IOLTA program violated their rights under the Fifth Amendment by taking their property without just compensation. (Phillips, at p. 163, 118 S.Ct. 1925.)
The Supreme Court noted the Fifth Amendment, made applicable to the States through the Fourteenth Amendment, "provides that `private property' shall not `be taken for public use, without just compensation.' Because the Constitution protects rather than creates property interests, the existence of a property interest is determined by reference to `existing rules or understandings that stem from an independent source such as state law.' [Citation.] [¶] All agree that under Texas law the principal held in IOLTA trust accounts is the `private property' of the client. [Citations.] ... The question in this case is whether the interest on an IOLTA account is `private property' of the client for whom the principal is being held." (Phillips, supra, 524 U.S. at pp. 163-164, 118 S.Ct. 1925.)
The high court relied on the established common law rule that "`interest follows principal.'" (Phillips, supra, 524 U.S. at p. 165, 118 S.Ct. 1925.) The court continued, "Indeed, in Webb's Fabulous Pharmacies, Inc. v. Beckwith, 449 U.S. 155, 162, 101 S.Ct. 446, 66 L.Ed.2d 358 (1980), we cited ... the general rule that `any interest ... follows the principal.'" (Phillips, supra, at p. 166, 118 S.Ct. 1925.)
In Webb's, the high court addressed "a Florida statute providing that interest accruing on an interpleader fund deposited in the registry of the court `"shall be deemed income of the office of the clerk of the circuit court."' [Citations.] The appellant in that case filed an interpleader action in Florida state court and tendered the sum at issue, nearly $2 million, into court. In addition to deducting $9,228.74 from the interpleader fund as a fee `for services rendered,' the clerk of [the] court also retained the more than $100,000 in interest income generated by the deposited funds. [Webb's] held that the statute authorizing the clerk to confiscate the earned interest violated the Takings Clause. As [the court] explained, `a State, by ipse dixit, may not transform private property into public property without compensation' simply by legislatively abrogating the traditional rule that `earnings of a fund are incidents of ownership of the fund *682 itself and are property just as the fund itself is property.' [Citation.]" (Phillips, supra, 524 U.S. at pp. 166-167, 118 S.Ct. 1925.)
In Phillips, the United States, as amicus curiae, further argued that "`private property' is not implicated by the IOLTA program because the interest income generated by funds held in IOLTA accounts is `government created value.'" (Phillips, supra, 524 U.S. at p. 170, 118 S.Ct. 1925.) Phillips disagreed, stating, "the State does nothing to create value; the value is created by respondents' funds." (Id. at p. 171, 118 S.Ct. 1925.)
Phillips noted, however, "[t]his would be a different case if the interest income generated by IOLTA accounts was transferred to the State as payment `for services rendered' by the State. [Citation.] Our holding does not prohibit a State from imposing reasonable fees it incurs in generating and allocating interest income. [Citations.] But here the State does not, indeed cannot, argue that its confiscation of respondents' interest income amounts to a fee for services performed. Unlike in Webb's, where the State safeguarded and invested the deposited funds, funds held in IOLTA accounts are managed entirely by banks and private attorneys." (Phillips, supra, 524 U.S. at p. 171, 118 S.Ct. 1925.)
Phillips concluded, "the interest income generated by funds held in IOLTA accounts is the `private property' of the owner of the principal." (Phillips, supra, 524 U.S. at p. 172, 118 S.Ct. 1925.) Phillips did not express any view as to whether those funds had been "`taken'" by the State, or any opinion as to the amount of "`just compensation,'" if any, due the respondents, leaving those issues to be addressed on remand. (Ibid.)

c. Brown held no just compensation was owed on IOLTA interest because the client-depositors did not suffer any pecuniary loss.

As indicated, Phillips did not address whether the interest income on the IOLTA accounts had been "`taken'" by the State, or the amount of "`just compensation,'" if any, due the respondents. (Phillips, supra, 524 U.S. at p. 172, 118 S.Ct. 1925.) The Supreme Court confronted those questions five years later in Brown, supra, 538 U.S. at p. 220, 123 S.Ct. 1406.
In Brown, the court found the interest generated on client funds deposited in IOLTA accounts was taken for a public use when it was turned over to the Legal Foundation of Washington, which used the proceeds for law-related charitable and educational purposes. (Brown, supra, 538 U.S. at pp. 224, 235, 123 S.Ct. 1406.)
However, despite the taking, no compensation was owed. Brown explained that just compensation is measured by the property owner's pecuniary loss, rather than the government's gain. (Brown, supra, 538 U.S. at pp. 235-236, 123 S.Ct. 1406.) The rules adopted by the Washington Supreme Court required lawyers and limited practice officers (LPOs)[5] to deposit client funds into IOLTA accounts only if the funds could not earn net interest for the client. (Id., at pp. 224, 227, 123 S.Ct. 1406.) Monies were to be deposited into IOLTA accounts when the funds "`are so nominal in amount or to be held for so short a period that the amount of interest that could be earned would not justify the cost of creating separate accounts....'" (Id., at pp. 223-224, 123 S.Ct. 1406.) Conversely, the rules required lawyers and *683 LPOs to deposit client funds in non-IOLTA accounts whenever those funds could generate net earnings for the client. (Id., at p. 239, 123 S.Ct. 1406.)
Because the client-depositors in Brown would not have earned any net interest on their funds (Brown, supra, 538 U.S. at p. 230, 123 S.Ct. 1406), the compensation due them for any taking of their property was nil. (Id., at p. 240, 123 S.Ct. 1406.)

3. Fifth Amendment taking principles implicated in IOLTA cases have no application here; the cash bail deposit was in the nature of a contract between the depositor and the government, and the terms of the contract did not include a provision for interest on the deposit.

Petitioners' reliance upon Phillips and Brown is misplaced. Those cases involved the involuntary taking by the government of private property, i.e., interest earned on client funds deposited in IOLTA accounts, for public use, namely, to fund legal services for low income individuals. Those circumstances implicate the Fifth Amendment, which requires the payment of just compensation when private property is taken for public use. However, those constitutional concerns are absent here.
The court defendants' refusal to pay petitioners interest on their cash bail deposits does not constitute a "taking" because there was no confiscation of private property by the court defendants for a public purpose, or at all. Rather, when petitioners voluntarily deposited cash bail to free the criminal defendants from custody, petitioners entered into contracts with the government by which petitioners guaranteed the appearance of the criminal defendants released on bail at all required court proceedings.
A bail transaction is a contract. It is established that "[a] bail bond is in the nature of a contract between the government and the surety; the surety acts as a guarantor of the defendant's appearance under risk of forfeiture of the bond. [Citation.] The surety guarantees that the defendant will appear at the specific time and place and if the defendant fails to appear at the specified time and place, the surety is absolutely indebted to the state for the amount of the bond. [Citation.] The scope of a surety's contractual obligation under the appeal bond is defined by applicable statutory law and language of the bond itself. [Citation.]" (People v. Allen (1994) 28 Cal.App.4th 575, 581, 33 Cal.Rptr.2d 669; accord, People v. Amwest Surety Ins. Co. (1991) 229 Cal.App.3d 351, 356, 280 Cal.Rptr. 58 ["bail bond is in the nature of a contract between the government and the surety"]; People v. Doe (1959) 342 P.2d 533, 172 Cal.App.2d Supp. 812, 813["[t]he obligation of the bail bond is contractual"]; United States v. Lujan (9th Cir.1978) 589 F.2d 436, 438 ["bail bond is a contract between the government and the defendant and his surety"].)
Although the case law typically involves bail bonds, rather than cash bail deposits,[6] that is a distinction without a difference for purposes of the discussion herein. The statutory scheme provides various alternatives for posting bail. A defendant may be released from custody upon (1) execution of a bail bond or undertaking of bail by an admitted surety insurer (Pen.Code, § 1276);[7] (2) deposit by the defendant or any other person of cash in the amount of the bail (§§ 1295, 1296); (3) deposit by the *684 defendant or any other person of bonds of the United States or State of California "of the face value of the cash deposit required" (§ 1298); or (4) provision by the defendant or any other person of equity in real property equal to twice the amount of the cash deposit required (§ 1298). Irrespective of the particular type of security given for the defendant's release, the obligation of the parties is contractual.
Accordingly, the obligation herein is contractual in nature and is defined by statute as well as by the language of the contract. (People v. Allen, supra, 28 Cal.App.4th at p. 581, 33 Cal.Rptr.2d 669.)
The statutory scheme governing bail, section 1268 et seq., does not require the payment of interest on cash bail deposits. The Legislature has made no provision therefor.
Likewise, the written contracts herein, evidenced by standard form bail receipts, do not include a provision that interest will be paid on cash bail deposits. With respect to the obligations of the parties, the bail receipts simply provide: "NOTICE: The above deposited bail will be forfeited if the defendant fails, at any time, to render himself or herself available to the orders and process of the court; and, if convicted, failure to appear for Pronouncement of Judgment or Grant of Probation."
Thus, the quid pro quo for the cash bail deposits which were posted herein was the release of the criminal defendants from custody. The contracts did not include a provision that petitioners would earn interest on the cash bail deposits. Now, after the bail was exonerated, petitioners would have the contracts rewritten to award them additional consideration in the form of interest on the bail between the date of deposit and the date of exoneration. Such a modification has no basis in contract law and must be rejected.
Therefore, petitioners are incapable of stating a cause of action for denial of pre-exoneration interest on their cash bail deposits. The trial court properly sustained the demurrer to the first cause of action without leave to amend.

4. The Fresno decision overlooked applicable contract law principles.

Finally, after resolving this matter pursuant to ordinary principles of contract law, we revisit the Fresno decision. There, the court held a county's retention of interest accrued on cash bail deposits in criminal proceedings is not an unconstitutional taking of private property. (Fresno, supra, 177 Cal.App.3d at p. 413, 222 Cal.Rptr. 886.) The Fresno court reasoned that bail money is deposited for a public purpose, namely, securing a defendant's appearance, and the interest earned thereon is reasonably needed to support the court system. (Id., at p. 412, 222 Cal.Rptr. 886.)
With respect to pre-exoneration interest, Fresno's rejection of a claimed right to interest on cash bail in criminal proceedings is correct in result.[8] However, we take issue with Fresno's rationale. The reason there is no right to pre-exoneration interest on cash bail is not that the money was deposited for a public purpose. Rather, no interest is owed because the bail deposit is made in accordance with the terms of a particular contract and the terms of that contract do not include a provision for pre-exoneration interest.[9]


*685 DISPOSITION
The order to show cause is discharged. The petition for writ of mandate is denied. No costs are awarded in this proceeding. (Cal. Rules of Court, rule 56.)
We concur: CROSKEY and ALDRICH, JJ.
NOTES
[1]  Money deposited into the TK7 Trust Fund earns interest which is deposited into the Los Angeles County general fund for general fiscal purposes.
[2]  In addition to the court defendants, the named defendants include the County of Los Angeles, the Los Angeles County Board of Supervisors, and the Los Angeles County Auditor-Controller (collectively, the county defendants).
[3]  Petitioners and the county defendants subsequently stipulated the trial court's March 17, 2004 order on the demurrers interposed by the court defendants "will be deemed applicable" to the county defendants.
[4]  The record in Fresno did not reflect whether the Fresno County Board of Supervisors had directed that interest earned on bail money be allocated to the support of the county courts, but Fresno took "judicial notice of the need of all of the counties in California for moneys to operate their courts." (Fresno, supra, 177 Cal.App.3d at p. 410, 222 Cal.Rptr. 886.)
[5]  LPOs are nonlawyers who are licensed to act as escrowees in the closing of real estate transactions and, like lawyers, often temporarily control the funds of their clients. (Brown, supra, 538 U.S. at p. 227, 123 S.Ct. 1406.)
[6]  However, we note that in United States v. Lujan, supra, 589 F.2d at p. 437, one of the appellants posted a cash bond.
[7]  All subsequent statutory references are to the Penal Code, unless otherwise specified.
[8]  The issue of post-exoneration interest is not before us.
[9]  As discussed above, the Fresno court held that although depositors of cash bail in criminal proceedings have no right to the accrued interest, the owners of cash deposits in civil proceedings are entitled to the interest earned on their moneys. (Fresno, supra, 177 Cal. App.3d at p. 409, 222 Cal.Rptr. 886.) Interest on cash deposits in civil proceedings is beyond the scope of this opinion. However, we observe that unlike cash deposits in criminal matters, cash deposits in civil cases are not contractual in nature and therefore are not governed by contract law principles. For example, Code of Civil Procedure section 529, subdivision (a), provides that upon granting an injunction, "the court ... must require an undertaking on the part of the applicant to the effect that the applicant will pay to the party enjoined any damages ... the party may sustain by reason of the injunction, if the court finally decides that the applicant was not entitled to the injunction." Similarly, Code of Civil Procedure section 1030 provides that "[w]hen the plaintiff in an action or special proceeding resides out of the state, or is a foreign corporation, the defendant may . . . apply . . . for an order requiring the plaintiff to file an undertaking to secure an award of costs and attorneys fees which may be awarded in the action or special proceeding." Such undertakings, or deposits in lieu of undertakings, are required by statute and are given to protect the opposing party in the litigation; they are not in the nature of a contract between the depositor and the court or the opposing party.
