I'd guesstimate (on past performance) the above will take < 0.05 seconds to read to the bottom of the list, assuming it didn't match eariler.
I had a discussion with someone about similar code a few years back with benchmarks and such and we concluded anything under 300,000 lines wasn't worth the effort of doing any different.
You could optimise it further one of two ways, since the further down the list you go the longer it takes sort the list in order of popularity, but I don't have any clever ways to determine that.
Or by sorting the list alphabetically and adding
if ($line > $town) {
break;
}
Then if Abingdon isn't on the list it will stop at Accrington instead of reading to York.
If you want more then have some precomputed points for the first entry for the inital letter and fseek to it.
But seriously, any more complexity that that you might as well put it in a database.