Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

Rule pow_to_exponentiationΒΆ

Converts pow to the ** operator.

WarningΒΆ

Using this rule is riskyΒΆ

Risky when the function pow is overridden.

ExamplesΒΆ

Example #1ΒΆ

--- Original
+++ New
 <?php
- pow($a, 1);
+ $a** 1;

Rule setsΒΆ

The rule is part of the following rule sets:

Source classΒΆ

PhpCsFixer\Fixer\Alias\PowToExponentiationFixer