The validation service doesn't support PHP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The validation service doesn't support PHP

Benjamin Lehmann
You cannot check PHP files with your validation service.

I would either recommend adding full PHP support, or treating PHP files as HTML, and ignore the <?php ?> tags.

Thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: The validation service doesn't support PHP

David Dorward-3

On 7 Nov 2014, at 15:51, Benjamin Lehmann wrote:

You cannot check PHP files with your validation service.

That's because it is a markup validation service, and PHP isn't markup.

I would either recommend adding full PHP support

Any decent tool to test the validity of the HTML generated by PHP would have to run the PHP repeatedly with different input so that sufficient different outputs were all tested. Coming up with good, generic input (which would vary query strings, POST data, headers) would be very difficult and end up with an enormous list and still miss plenty of cases. Running through that huge list would put a lot of load on the computer running the validation service.

Any test data needs to be tailored for the specific PHP program. This problem is far better solved in the test suite for the PHP than at the validator. The tests can run the PHP with suitable input, capture the output and then hand it over for validation (using the API).

or treating PHP files as HTML, and ignore the <?php ?> tags.

Again, lots of PHP programs would fail because the effects of running the PHP code are required to get valid markup output from the program.

--
David Dorward
http://dorward.co.uk/