A generic PHP accessor that is probably too clever for its own good.