Using Atom for a coursera class in php

I noticed if I write a small program using header('location : …php '); return; redirects that they work best if I start on a blank page and at their worst are completely unresponsive in large programs. Weird. If they don’t work in the document, I write a new file with the two header redirects. Test it. When it works, I start pasting code behind it as needed . Then it works. Really strange.