Tool
PHP Version Compatibility Checker
Check a PHP snippet against a short list of language features documented on php.net, and see whether they are newer than a version you choose.
Limitations. This is guidance, not a compatibility guarantee. A clean result does not prove the code runs. Features we are not sure about are left out, including most of PHP 8.5 beyond the pipe operator and array_first() / array_last(). Confirm anything important in the PHP manual and with a real PHP binary.
How to use it
Paste code, choose the PHP version you want to target, and run the check. Matches inside strings and comments are ignored. The page does not execute PHP.