[RCD] php code design/performance