Convert Extension to php