I have a word game and I use a word list to validate each word entered.
Currently words are in a TXT file (around 500KB).
A PHP script reads the file (with file_get_contents) and validates (with strpos) the word built by the player.
Now the game is getting more and more (but not huge) traffic each day and this approach started to cause memory issues on the (shared) server.
I guess web servers do some caching for frequently opened files and also PHP does the same for frequently used scripts but those did not help in this situation.
Anyway I thought porting the word list to a MySQL database and validate using queries might be a lot better solution. Is that right?