I'm faced with the challenge of refactoring and adding new features to a legacy PHP web "application", it consists of about 788 php scripts, which have no folder structure, they are in the most part scripts which contain JavaScript, PHP, HTML, and CSS code in the same file, the scripts persist and use data from 3 different database types, MSSQL, MYSQL and DB2, there authentication is session based, most of it it's basic php and there's also some pages which use pure html and ajax to communicate to the php scripts, needless to say there is no class definitions, on the most part not even functions.
My goal is to translate this into a more maintainable application most likely using symfony components to which I'm familiar, introduce HTTP request abstraction, routing and if possible MVC, also refactor the code into usable classes and implement auto loading using composer to take advantage of 3rd party libraries.
Frankly the only option in my mind is to ditch all of it and start a new project.