LogoPHP Version Checker
  • URL Checker
  • Code Checker
  • PHP Versions
  • FAQ
LogoPHP Version Checker

Check the PHP version of any website in seconds

Email
Tool
  • PHP Version Checker
  • PHP Code Compatibility Checker
  • PHP Versions & EOL Dates
  • FAQ
Legal
  • Privacy Policy
  • Terms of Service
© 2026 PHP Version Checker All Rights Reserved.
Home / PHP Code Version Checker

PHP Code Version & Compatibility Checker

Paste PHP code to find the minimum PHP version it needs, and spot removed or deprecated features that break on newer PHP. Free, no sign-up, and your code never leaves your browser.

PHP code

Your code is analyzed in your browser and never uploaded.

Want to know which PHP version a live website runs instead? Check a website URL.

What the checker looks for

  • New features

    Syntax, types, functions, classes and constants added in each version, from short arrays (5.4) to the pipe operator (8.5). The newest one found sets the minimum version.

  • Removed features

    Things that no longer exist, like mysql_*, ereg(), each() and create_function(). They cap the maximum version your code can run on.

  • Deprecations

    Features that still work but trigger warnings, like utf8_encode(), "${var}" interpolation and implicitly nullable parameters.

Which PHP version introduced each feature

A quick reference of common PHP features and the version that added them.

FeatureExampleMinimum PHP
Pipe operator$x |> trim(...)PHP 8.5
Property hookspublic string $n { get => … }PHP 8.4
Asymmetric visibilitypublic private(set) string $nPHP 8.4
Typed class constantsconst string NAME = …PHP 8.3
Readonly classesreadonly class PointPHP 8.2
Enumsenum Status: stringPHP 8.1
Readonly propertiespublic readonly int $idPHP 8.1
never return typefunction stop(): neverPHP 8.1
match expressionmatch ($x) { … }PHP 8.0
Nullsafe operator$user?->namePHP 8.0
Named argumentsfoo(name: "x")PHP 8.0
Union typesint|string $idPHP 8.0
Constructor promotionfunction __construct(private int $x)PHP 8.0
str_contains()str_contains($a, $b)PHP 8.0
Typed propertiesprivate int $age;PHP 7.4
Arrow functionsfn($x) => $x * 2PHP 7.4
Null coalescing assignment$a ??= 1PHP 7.4
Flexible heredocindented closing markerPHP 7.3
Nullable types?string $namePHP 7.1
void return typefunction f(): voidPHP 7.1
Scalar type declarationsfunction f(int $x)PHP 7.0
Null coalescing operator$a ?? "default"PHP 7.0
Spaceship operator$a <=> $bPHP 7.0
Variadic functionsfunction f(...$args)PHP 5.6
Short array syntax[1, 2, 3]PHP 5.4

Checking a whole project

This tool is ideal for snippets, single files and plugin code. To scan an entire codebase, use PHPCompatibility with PHP_CodeSniffer:

composer require --dev phpcompatibility/php-compatibility
vendor/bin/phpcs -p . --standard=PHPCompatibility \
  --runtime-set testVersion 8.3-

Then check your server with the PHP Version Checker and compare against the PHP support timeline.

Frequently asked questions

How do I find the minimum PHP version for my code?

Paste the code into the PHP Code Version Checker above and click "Check PHP version". It looks for syntax, functions, classes and constants that were added in specific PHP versions and reports the highest one, which is the minimum version your code needs.

What is a PHP compatibility checker?

A PHP compatibility checker scans PHP code for features that only exist in certain PHP versions. It tells you which versions the code can run on, and flags removed or deprecated features that will break or warn when you upgrade PHP.

Is my code uploaded anywhere?

No. The analysis runs entirely in your browser with JavaScript. Your code is never sent to a server.

How accurate is the result?

It is a fast static check, not a full PHP parser, so treat the result as a strong estimate. It does not check PHP extensions, php.ini settings or Composer dependencies, which can raise the real minimum version. For a whole project, run PHPCompatibility with PHP_CodeSniffer.

How do I check a whole project or WordPress plugin for PHP compatibility?

Install PHPCompatibility with Composer (composer require --dev phpcompatibility/php-compatibility) and run vendor/bin/phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8.3-. For WordPress, use the phpcompatibility/phpcompatibility-wp ruleset.

Which PHP version should my code target?

Target a version that still receives security updates. See the PHP versions page for current support dates.