adapt php