Title: &quot;?&gt;&quot; ending php code
Last modified: August 31, 2016

---

# "?>" ending php code

 *  [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/ending-php-code/)
 * closing tags “?>” seem to be missing in some theme’s template files. I have seen
   that it is not usually used in functions.php but I now see it missing in other
   template files as well.
 * is it not necessary to close off the “<?php” line at the end of a template file
   and functions.php?
 * Al

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/ending-php-code/#post-6987773)
 * Closing tags are not required in php functions, and in fact, leaving off closing
   tags will forgive some types of PHP errors from junk characters that could result
   in white screens.
    [http://php.net/basic-syntax.phptags](http://php.net/basic-syntax.phptags)
 *  Thread Starter [almcr](https://wordpress.org/support/users/almcr/)
 * (@almcr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/ending-php-code/#post-6987841)
 * OK, that is what I figured.
 * still different to not see closing tags on a template file, other than functions.
   php. I noticed it in some of the template files used in “underscores”.
 * Al

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘"?>" ending php code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [almcr](https://wordpress.org/support/users/almcr/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/ending-php-code/#post-6987841)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
