pow_to_exponentiation.rst 920 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ==============================
  2. Rule ``pow_to_exponentiation``
  3. ==============================
  4. Converts ``pow`` to the ``**`` operator.
  5. Warning
  6. -------
  7. Using this rule is risky
  8. ~~~~~~~~~~~~~~~~~~~~~~~~
  9. Risky when the function ``pow`` is overridden.
  10. Examples
  11. --------
  12. Example #1
  13. ~~~~~~~~~~
  14. .. code-block:: diff
  15. --- Original
  16. +++ New
  17. <?php
  18. - pow($a, 1);
  19. + $a** 1;
  20. Rule sets
  21. ---------
  22. The rule is part of the following rule sets:
  23. - `@PHP56Migration:risky <./../../ruleSets/PHP56MigrationRisky.rst>`_
  24. - `@PHP70Migration:risky <./../../ruleSets/PHP70MigrationRisky.rst>`_
  25. - `@PHP71Migration:risky <./../../ruleSets/PHP71MigrationRisky.rst>`_
  26. - `@PHP74Migration:risky <./../../ruleSets/PHP74MigrationRisky.rst>`_
  27. - `@PHP80Migration:risky <./../../ruleSets/PHP80MigrationRisky.rst>`_
  28. - `@PhpCsFixer:risky <./../../ruleSets/PhpCsFixerRisky.rst>`_
  29. - `@Symfony:risky <./../../ruleSets/SymfonyRisky.rst>`_