implement php refs