W3C home > Mailing lists > Public > www-validator@w3.org > July 2011

Re: PHP Validations NEEDED

From: David Dorward <david@dorward.me.uk>
Date: Sat, 23 Jul 2011 16:09:44 +0100
Cc: www-validator@w3.org
Message-Id: <ED525DAA-FA05-4215-8D2F-6663CE39C062@dorward.me.uk>
To: zHosting Solutions <zhosting.solutions@gmail.com>
On 23 Jul 2011, at 00:37, zHosting Solutions wrote:
> I need to validate some PHP code and I would like to suggestion that you would please add the ability to validate PHP files. Thanks.

The PHP interpreter will "validate" PHP files. If it errors, then there is a problem.

It would not be feasible for a markup validator to take PHP source code as input  it would have to test every possibly permutation of input (some of which might require access to databases or other web services), which simply isn't possible (since resources are not infinite).

It is up to you to construct a robust set of test data, generate HTML documents from it, and validate the resulting HTML.

The validator has an API[1], so you can do this automatically as part of the normal test suite for your application. I recommend installing[2] a local copy of the validator if you plan to do this, as it will be faster and reduce the load on the public service.

[1] http://validator.w3.org/docs/api.html
[2] http://validator.w3.org/docs/install.html

David Dorward
Received on Saturday, 23 July 2011 15:10:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:04 UTC