Rule encoding
¶
PHP code MUST use only UTF-8 without BOM (remove BOM).
Examples¶
Example #1¶
--- Original
+++ New
-<?php
+<?php
echo "Hello!";
Rule sets¶
The rule is part of the following rule sets:
References¶
Fixer class: PhpCsFixer\Fixer\Basic\EncodingFixer
Test class: PhpCsFixer\Tests\Fixer\Basic\EncodingFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.