Changing return type from php script