Template customization

Is there a practical way to edit php and view results progressively? With html it’s easy to just drop your file in a web browser for a preview at any point in the process but since that’s not possible with php, I find myself going back to the dashboard and generating a new invoice each time I tamper with anything. Is there something I’m missing?
thank you.