Sample PHP code culled from various past projects