PHP Syntax Checker Online
Paste PHP code and press “Check PHP” to find the first syntax error.
Your text and files never leave your browser — nothing is sent to a server.
How to use
- Paste PHP code and press “Check PHP”. The <?php tag is optional — plain code works too.
- If there is an error, the problem line is shown with a ^ marker, and the status line tells you the line, column and what was expected.
- Set “PHP version” to match your server so that syntax unavailable in that version (for example, enums in 8.0) is reported too.
- PHP stops parsing at the first error. Fix it and check again to find the next one.
FAQ
Is this the same as php -l?
The code is read by an open-source PHP parser written in JavaScript (glayzzle php-parser), so results usually match, but they can differ in rare cases. Run php -l with real PHP before you deploy.
Why is the error reported on the wrong line?
A missing semicolon is usually reported at the first token of the next line. Check the end of the line just above the one shown.
Is my code uploaded or executed?
No. The browser only parses the syntax; the code is never run or sent anywhere.
Related tools
All tools
Unit Converters
- Unit Converter
- Temperature Converter
- Weight Converter
- Area Converter
- Length Converter
- Angle Converter
- Calorie Converter
- Data Size Converter
- Dry Volume Converter
- Electric Charge Converter
- Energy Converter
- Flow Rate Converter
- Force Converter
- Fuel Economy Converter
- Luminous Intensity Converter
- Magnetomotive Force Converter
- Power Converter
- Pressure Converter
- Radiation Dose Converter
- Speed Converter
- Time Unit Converter
- Volume Converter