PHP version compatibility checker
Paste PHP and see the minimum version it needs, plus every removed or deprecated function that will break on a modern runtime.
About the php version compatibility checker
Before moving a legacy application to a modern PHP runtime, you need to know two things: the minimum version the code already requires, and everything in it that a newer runtime has removed. This checker answers both from a pasted file or a representative chunk of the codebase.
Deprecated and removed calls are the ones that matter. Syntax that merely warns can wait; a removed function is a fatal error on deploy day.
When to use it
- You are planning a PHP runtime upgrade and need an inventory of blockers.
- You inherited a codebase with no stated PHP requirement.
- You are checking whether a single legacy file can run on a modern host.
- You want to show a stakeholder concretely why an upgrade is not a config change.
What it does not do
- It analyses what you paste, not the whole repository.
- It does not detect behavioural changes that compile fine but produce different results.
- Extension availability on your target host is not something it can see.
How the result is produced
Detected syntax features are mapped to the PHP version that introduced them, giving a minimum required version. Function and construct usage is checked against removal and deprecation lists per release, and each finding names the version that changed it.
What to watch out for
Runtime upgrades fail in two distinct ways. The loud way is a removed function, which produces an immediate fatal error and is easy to find. The quiet way is changed behaviour in code that still runs — comparison semantics, string-to-number handling, default argument treatment — which produces wrong results rather than errors. This checker finds the loud category reliably and that is worth being explicit about.
Work through findings by severity rather than by file. Anything removed in a version at or below your target blocks the deploy. Deprecations are a maintenance backlog: they will keep working for at least one more major release, but they generate noise that hides real errors in your logs.
Pair the scan with a test run on the target runtime in CI. Static detection tells you what will definitely break; executing the suite on the new version tells you what actually does.
When the scan produces a long list, resist the urge to fix everything at once. Group findings by the pattern behind them — a removed extension used in twelve files is one decision and twelve mechanical edits, not twelve decisions. Fix the blocking patterns first, get the application running on the target runtime behind a feature flag or on a staging host, and then work through deprecations while the code is already exercised. Upgrades that ship in slices are the ones that finish; upgrades that wait for a perfectly clean report tend to be abandoned halfway through.
Real inputs and the exact output
Every example below was run through this php version compatibility checker and copied verbatim.

Example 1: Legacy code that breaks on PHP 8.2
A helper class carried over from a PHP 7 project.
`${var}` interpolation is deprecated in 8.2 and removed in 9.0. It is the most common silent blocker in an 8.x upgrade.
Input
<?php
class Report {
public $rows;
public function __construct($rows) { $this->rows = $rows; }
public function total() {
return array_sum(array_map(function($r) { return $r['amount']; }, $this->rows));
}
}
$s = "Total: " . $total; // legacy ${...} interpolation removedFindings
Minimum version: PHP 5.4 (short array + closures)
PHP 8.2 DEPRECATED "${total}" string interpolation
use "{$total}" instead
PHP 8.4 NOTICE implicitly nullable parameters
MODERNISE
PHP 8.0 constructor property promotion
PHP 7.4 arrow fn: fn($r) => $r['amount']
PHP 7.4 typed property: public array $rows;How it works
- Paste a PHP file or a representative chunk of a legacy codebase.
- Review the detected syntax features and the minimum PHP version they imply.
- Work through the removed and deprecated calls — those are the upgrade blockers.
Frequently asked questions
- How does the checker decide the minimum PHP version?
- It scans for version-gated syntax — arrow functions, null coalescing assignment, match expressions, the nullsafe operator, attributes, enums and readonly properties — and reports the highest version any of them require.
- Is a clean result a guarantee my code runs on PHP 8.3?
- No. Static text scanning cannot see runtime behaviour, dynamic calls, or incompatibilities inside your dependencies. Treat it as a fast triage pass, then run the real test suite on the target version.
- What usually blocks a PHP 7 to PHP 8 upgrade?
- Removed `mysql_*` and `create_function()` calls, `each()`, curly-brace string offsets, stricter type juggling in comparisons, and abandoned packages with no PHP 8 release. The last one is normally the real cost.
Stuck on an unsupported PHP version?
The Laravel upgrade service takes you from a legacy runtime to a supported one incrementally, with the test coverage needed to prove nothing regressed.
Related free tools
composer.json validator — Check a composer.json for invalid JSON, malformed package names, unbounded version constraints and broken PSR-4 autoload rules before Composer refuses to install.
PHP formatter — Reindent messy PHP to a consistent PSR-12-style layout in the browser, or minify it back down. Nothing is uploaded — the formatting runs entirely on your machine.
Laravel migration generator — A free Laravel migration generator and visual schema builder: design a table — columns, types, nullability, indexes, foreign keys — and get a valid migration class with the correct filename.
All free Dev Loader tools
Every tool below runs entirely in your browser — no account, no upload and no limits. 25 tools in total.
- Software development cost calculator
- Website cost calculator
- App development cost calculator
- Freelance rate calculator
- Cron expression generator
- Meta tag generator
- .htaccess redirect generator
- PHP formatter
- JSON to PHP array converter
- composer.json validator
- Laravel upgrade readiness scanner
- URL slug generator
- Unix timestamp converter
- Laravel .env generator
- PHP regex tester
- Laravel migration generator
- Laravel validation rule builder
- Laravel .gitignore generator
- Artisan command cheatsheet
- Carbon date format helper
- Composer dependency conflict decoder
- Laravel failed job decoder
- Laravel Cashier webhook diagnostic
- Laravel version and EOL risk checker
- Free tools hub