What the…?> PHP and unwanted whitespace

Over at BigBlueHat there is an interesting blog post about using the ?> at the end of php files. While personally I don’t use it on scripts that contain just php code, but I can see where both sides are coming from.

Check out the article and leave your feedback!

1 Comment

  1. Having been bitten by this before, I can appreciate how important this piece of advice is. If you are including a library with 20+ files in it and 1 of those files ends with “?>[space]” you’ll get the headers cannot be send error. Good luck finding out which file does it.

Leave a Reply