---
title: "lint/style/no-is-null"
pagination: false
---

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

<RuleId id="lint/style/no-is-null" />

Not in any set. Unsafe fix: it can change behaviour.

## What it does

Replaces `is_null($var)` expression with `null === $var`.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/no-is-null" = "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

- [`is_null`](https://cs.symfony.com/doc/rules/language_construct/is_null.html) (php-cs-fixer, risky)
- [`no-is-null`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-is-null) (mago-linter)

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