changing return types and php docs