This is a technical assessment question. The goal is to write a PHP program which reads three input files:
subscribers.txt - a list of people subscribed to our newsletter
unsubscribed.txt - a list of people who have unsubscribed
bounced.txt - a list of addresses which have bounced in the past
Each file is plain text and contains one email address per line.
The program should consider the list of subscribers and remove anyone who has unsubscribed or bounced, since we don't want to send the newsletter to them. It should then output a list of the people who will receive the email.
Now the key...
How well will your program perform against a list of a million subscribers?
1) In order to do the cross-checks between lists, it seems we'll have to have the entirety of at least one file in memory at one point in time
2) We could parse the subscribers.txt file one line at a time with fgets.
What tricks could we use to grab say, 600 thousand subscribers, and cross check against an equally large list of bounced emails and unsubscribed emails?