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

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

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

**[no-finfo-buffer-context](/docs/rules/lint/php-8-5/no-finfo-buffer-context)**

Remove argument by position by function name

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

**[no-null-array-key](/docs/rules/lint/php-8-5/no-null-array-key)**

Replace null key in array_key_exists with empty string

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

**[no-null-debug-info](/docs/rules/lint/php-8-5/no-null-debug-info)**

Replaces `null` return value with empty array in `__debugInfo` methods

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

**[no-out-of-range-chr](/docs/rules/lint/php-8-5/no-out-of-range-chr)**

Wrap chr() argument with % 256 to avoid deprecated out-of-range integers

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

**[prefer-array-first-last](/docs/rules/lint/php-8-5/prefer-array-first-last)**

Make use of array_first() and array_last()

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

**[prefer-ord-first-byte](/docs/rules/lint/php-8-5/prefer-ord-first-byte)**

Replace ord($str) with ord($str[0])

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