How to extend lifetime of legacy PHP applications