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

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

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

**[no-case-insensitive-constant](/docs/rules/lint/php-7-3/no-case-insensitive-constant)**

Change case insensitive constants to sensitive ones

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

**[no-case-insensitive-define](/docs/rules/lint/php-7-3/no-case-insensitive-define)**

Change case insensitive constant definition to sensitive one

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

**[no-heredoc-label-in-body](/docs/rules/lint/php-7-3/no-heredoc-label-in-body)**

Changes heredoc/nowdoc that contains closing word to safe wrapper name

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

**[no-unescaped-regex-dash](/docs/rules/lint/php-7-3/no-unescaped-regex-dash)**

Escape - in some cases

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

**[prefer-array-key-first](/docs/rules/lint/php-7-3/prefer-array-key-first)**

Make use of array_key_first() and array_key_last()

In the `lint-strict` preset. In Rector's `rector/php-polyfills`, `rector/php73` sets. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.3 or later.

**[prefer-array-key-first-last](/docs/rules/lint/php-7-3/prefer-array-key-first-last)**

Make use of array_key_first() and array_key_last() instead of reading a single key off array_keys()

In the `lint-strict` preset. In Rector's `rector/php-polyfills`, `rector/php73` sets. Unsafe fix: it can change behavior. Runs only when `[php] version` is 7.3 or later.

**[prefer-is-countable](/docs/rules/lint/php-7-3/prefer-is-countable)**

Changes is_array + Countable check to is_countable

In the `lint-recommended` preset and every stricter one. In Rector's `rector/php-polyfills`, `rector/php73` sets. Safe fix. Runs only when `[php] version` is 7.3 or later.

**[prefer-setcookie-options](/docs/rules/lint/php-7-3/prefer-setcookie-options)**

Convert setcookie argument to PHP7.3 option array

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

**[require-string-needle](/docs/rules/lint/php-7-3/require-string-needle)**

Make needles explicit strings

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