octal_notation.rst 621 B

1234567891011121314151617181920212223242526272829303132
  1. =======================
  2. Rule ``octal_notation``
  3. =======================
  4. Literal octal must be in ``0o`` notation.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. -<?php $foo = 0123;
  13. +<?php $foo = 0o123;
  14. Rule sets
  15. ---------
  16. The rule is part of the following rule sets:
  17. - `@PHP81Migration <./../../ruleSets/PHP81Migration.rst>`_
  18. - `@PHP82Migration <./../../ruleSets/PHP82Migration.rst>`_
  19. - `@PHP83Migration <./../../ruleSets/PHP83Migration.rst>`_
  20. Source class
  21. ------------
  22. `PhpCsFixer\\Fixer\\Basic\\OctalNotationFixer <./../src/Fixer/Basic/OctalNotationFixer.php>`_