---
title: "lint/style/prefer-pow-operator"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/style/prefer-pow-operator" />

In the [`lint-strict`](/docs/rules/presets/lint-strict) preset. In Rector's [`rector/php56`](/docs/rules/sets/rector/php56) set. Unsafe fix: it can change behavior.

## What it does

Converts `pow` to the `**` operator.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/prefer-pow-operator" = "error"
```

To skip it in some files, add an [override](/docs/configuration/pun-toml#lint) or a [`@pun-ignore-file`](/docs/configuration/ignore-comments) comment.

## Replaces

- [`pow_to_exponentiation`](https://cs.symfony.com/doc/rules/alias/pow_to_exponentiation.html) (php-cs-fixer, risky)
- [`PowToExp`](https://getrector.com/rule-detail/pow-to-exp-rector) (rector)

[More lint/style rules](/docs/rules/lint/style) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
