If a page contains only PHP code, best practice is to omit the PHP end tag ( ?> ). PHP does not require the end tag on PHP only pages.
Including the end tag can cause unwanted injection of trailing white spaces which can cause header already sent errors.