In a similar situation....
The company I work for develops on Macs mainly. I develop on Windows. The servers are Linux. When other developers make files or modifications and save them, they upload from Mac to Linux. I upload Windows to Linux. My editor (Edit Plus) automatically saves files in Unix format (by my preference). So one day things "stop working" for a specific feature. I download the file, compare and they're technically the same, except for line-endings. I change the line-endings form \r\n to \n and re-upload. Poof!! The errors are gone, and the feature works.
The only reason I caught it is because my personal server said there was no function defined and output the php script on one line. Had I not tried it on my server, I'm sure I'd still be scratching my head, because it never would have crossed my mind to check line-endings...
And yes, I've seen the same kind of issue where adding an echo or die or print statement makes it work. Happened to me a couple times. Never really know what causes it to work, but after I remove it, it works fine from then on....