How to use this developer tool
- Paste PHP code.
- Select a validation profile.
- Enter a target PHP version.
- Enable strict typing and naming rules.
- Review failed rules.
Validate PHP source against configurable version, typing, naming, structure, and project-style rules. Unlike the quick checker, this tool focuses on rule compliance.
It applies a selected validation profile, counts passed and failed rules, and reports required fixes separately from optional improvements.
Passing this validator does not guarantee runtime success. Use php -l, static analyzers, tests, and your project coding standard for final verification.
Input: an untyped snake_case class.
Strict output: missing strict_types, namespace, parameter types, return types, and PascalCase naming.
Select a profile, enter 8.2, and run validation to check selected modern syntax and project rules.
Enable Require strict_types. The validator checks for declare(strict_types=1).
Enable naming checks to flag class names that are not PascalCase and methods that are not camelCase.
Set the target version. The validator compares known feature patterns such as enums and readonly properties with that target.
The checker finds likely mistakes quickly; the validator measures compliance against an explicit ruleset.
| Module | Purpose |
|---|---|
| Strict types | declare(strict_types=1) |
| Typing | Properties, parameters, returns |
| Naming | PascalCase and camelCase |
| Compatibility | Target PHP version |