Longest common substring — DIY on PHP

Much have been written about this, and the optimal solution is presented as searching through a “suffix tree”. But setting up a suffix tree…