Title: Code of php files
Last modified: July 14, 2018

---

# Code of php files

 *  [jkepler](https://wordpress.org/support/users/jkepler/)
 * (@jkepler)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/code-of-php-files/)
 * Hi
 * I’m having some troubles regarding my plugins encoding – ansi, utf8, etc. Any
   plugin I make, works in my website and in most of my users. However, in some,
   the plugin gives the “last character error” – namely in xampp, local, for testing
   purposes; instead of outputing a variable like <?php echo… xampp reads %3C?%20echo…
 * Do I save the php files in plain ansi, in ascii mode? Or Unix? Or in utf8? New
   line and/or carriage return?…
 * Is there a aprox. universal form for compatibility?
 * Kind regards,
    -  This topic was modified 7 years, 11 months ago by [jkepler](https://wordpress.org/support/users/jkepler/).

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/code-of-php-files/#post-10494061)
 * PHP files used by WP should be UTF-8 with no byte order mark. When creating PHP
   files, it’s customary to omit the final `?>` closing tag. This prevents mysterious
   output from occurring when it is not appropriate. Any text after a closing `?
   >`, even invisible white space, line feeds, etc., will cause possibly inappropriate
   output. Without the final tag, no output can occur unless it’s explicitly echoed
   or printed by PHP code. Extra whitespace within PHP tags has no impact on output.

Viewing 1 replies (of 1 total)

The topic ‘Code of php files’ is closed to new replies.

## Tags

 * [ANSI](https://wordpress.org/support/topic-tag/ansi/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [unix](https://wordpress.org/support/topic-tag/unix/)
 * [utf8](https://wordpress.org/support/topic-tag/utf8/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/code-of-php-files/#post-10494061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
