encoding.rst 641 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. =================
  2. Rule ``encoding``
  3. =================
  4. PHP code MUST use only UTF-8 without BOM (remove BOM).
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,3 +1,3 @@
  13. -<?php
  14. +<?php
  15. echo "Hello!";
  16. Rule sets
  17. ---------
  18. The rule is part of the following rule sets:
  19. @PSR1
  20. Using the ``@PSR1`` rule set will enable the ``encoding`` rule.
  21. @PSR2
  22. Using the ``@PSR2`` rule set will enable the ``encoding`` rule.
  23. @Symfony
  24. Using the ``@Symfony`` rule set will enable the ``encoding`` rule.
  25. @PhpCsFixer
  26. Using the ``@PhpCsFixer`` rule set will enable the ``encoding`` rule.