Could someone refer me to an online PHP validator?
It would be of much help.
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To expand on my comment.
You can validate on the command line using
php -l [filename], which does a syntax check only (lint). This will depend on your php.ini error settings, so you can edit you php.ini or set the error_reporting in the script.Here’s an example of the output when run on a file containing:
Results in:
I suggested you build your own validator.
A simple page that allows you to upload a php file. It takes the uploaded file runs it through
php -land echos the output.Note: this is not a security risk it does not execute the file, just checks for syntax errors.
Here’s a really basic example of creating your own: