There are nearly 5,000 school gardens across the United States, living lessons that sprout on rooftops and lawns, in greenhouses and classrooms.

Of the 133 in Pennsylvania, one of the more fruitful flourishes in a former courtyard at Bucks County's Bristol Middle-High School, where 4,000 plants occupy 30,000 neatly-tended square feet. A small farm, really.

In four years, the garden has grown to 21 raised beds, with an herb wall, a pond graced by a waterfall, a cistern, arbors, tree-shaded picnic benches, and a new vermiculture system in which worms turn food waste into nutrient-rich compost.

"Everything is getting bigger and bigger and crazier and crazier," said eighth-grade history teacher Doug Braun, who runs a three-week summer gardening camp that draws about 20 teens not allergic to hard work on steaming hot days.

Ask the campers what they like best about the produce they tend, and they say, as 15-year-old Madison Devlin did: "It's so much better. It's fresh."

Brandon Vickers, 14, showed off the handful of root vegetables he had just pulled up, and declared, "Look at the size of that turnip!"

During the school year, dozens more students grow seedlings, and prepare and plant the beds, often after the class day ends.

Through gardens, educators say, you can teach almost anything.

"They're great learning tools," said Elizabeth McDonnell, the Pennsylvania representative for the National Farm to School Network, which advocates for locally produced food and its use in schools. "School gardens [can] teach nutrition, agriculture, economics, science, history."

Some studies also credit school gardens with increasing academic success, reducing obesity, and improving social and emotional behaviors, according to the National School Garden Program run by Slow Food USA, another advocacy group.

In his Bristol Borough school, Braun said, "there are some kids who are barely passing classes. But once they get in the garden, that's their thing. There are kids who skip lunch to plant seedlings."

He oversees the project with ninth-grade reading teacher Maria Doherty. Both incorporate gardening - and issues of food sources, safety, pesticides - into their class lessons. Doherty's students read a school version of The Omnivore's Dilemma: A Natural History of Four Meals, in which author Michael Pollan explores the food chain. Braun teaches about fermentation in the Middle Ages, connecting it to the ways wine, cheese, and chocolate are made today.

"It's hard, with ninth graders, to introduce world issues that they can relate to," Doherty said. "Food is one of them."

Braun, 36, grew up in pastoral Churchville, but never gardened until he decided to beautify an old courtyard at another Bristol Borough school where he once taught, Snyder-Girotti Elementary. Doherty spent her childhood in the Juniata Park section of Philadelphia, and started growing vegetables as a teen on a small plot next to her driveway. She knew her way around seedlings.

The Middle-High School garden has been fed by grants - a total of $50,000, including $10,000 from hygiene and paper products company SCA, and $20,000 from the U.S. Department of Education.

This summer, the gardening campers have renovated a 10-by-15-foot pond with a waterfall, replacing the liner and piling rocks around the perimeter - a job that Braun said might have been the most laborious thing many of them have ever done. They also plan to build a greenhouse.

Vegetables grow in containers of all sizes and shapes, from rectangular beds where rows of tomatoes hug lattices, to potatoes sprouting in 10-gallon pots, to herbs flowing out of cutout soda bottles. Two new areas this year are "Pepperville," with 20 varieties; and the watermelon and pumpkin patch.

The garden is so productive that the school delivers two large trayfuls twice a week to a local food bank.

For campers one recent day, Ronda Martinez, the family and consumer science teacher, prepared a lunch of deviled eggs and a salad bar, with just-snipped lettuce and kale, radishes, carrots, and a dressing made of sun-dried tomatoes from last year's crop.

As the teens filled their plates, Braun expounded on their next venture: applying for a grant to plant a 100-tree orchard near the high school track. They wanted to raise chickens in the garden, he said, but the superintendent nixed that idea, citing the smell.

"But if we get an orchard, we're going to get chickens," he said, then added - joking, maybe - "and a pig."