---
title: "lint/php-7.4"
pagination: false
---

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

Upgrade to PHP 7.4: code a newer PHP removes, deprecates or does better.

**[add-null-property-default](/docs/rules/lint/php-7-4/add-null-property-default)**

Add null default to properties with PHP 7.4 property nullable type

In the `lint-strict` preset. In Rector's `rector/php74` set. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.4 or later.

**[no-array-key-exists-on-object](/docs/rules/lint/php-7-4/no-array-key-exists-on-object)**

Change array_key_exists() on property to property_exists()

In the `lint-strict` preset. In Rector's `rector/php74` set. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.4 or later.

**[no-filter-magic-quotes](/docs/rules/lint/php-7-4/no-filter-magic-quotes)**

Change filter_var() with slash escaping to addslashes()

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.

**[no-hebrevc](/docs/rules/lint/php-7-4/no-hebrevc)**

Change hebrevc($str) to nl2br(hebrev($str))

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.

**[no-mb-strrpos-encoding-offset](/docs/rules/lint/php-7-4/no-mb-strrpos-encoding-offset)**

Change mb_strrpos() encoding argument position

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.

**[no-money-format](/docs/rules/lint/php-7-4/no-money-format)**

Change `money_format()` to equivalent `number_format()`

In the `lint-strict` preset. In Rector's `rector/php74` set. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.4 or later.

**[no-reflection-export](/docs/rules/lint/php-7-4/no-reflection-export)**

Change export() to ReflectionFunction alternatives

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.

**[no-restore-include-path](/docs/rules/lint/php-7-4/no-restore-include-path)**

Change restore_include_path() to ini_restore("include_path")

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.

**[prefer-arrow-function](/docs/rules/lint/php-7-4/prefer-arrow-function)**

Change closure to arrow function

In the `lint-strict` preset. In Rector's `rector/php74` set. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.4 or later.

**[prefer-coalesce-assign-over-if](/docs/rules/lint/php-7-4/prefer-coalesce-assign-over-if)**

Change `if` null guard with single assign to null coalescing assign `??=`

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php74` set. Safe fix. Runs only when `[php] version` is 7.4 or later.
