Page 1 of 1

PEAR PHP_CodeSniffer: PHP version not specified

Posted: Thu Jan 07, 2010 3:48 pm
by jeff00seattle
Hi

Is there as way to specify at the head of a PHP file what version of PHP executable that must be used?

I am using PEAR PHP_CodeSniffer, http://pear.php.net/package/PHP_CodeSniffer, and it during validation it is returning warning: PHP version not specified

Thanks

Jeff in Seattle

Re: PEAR PHP_CodeSniffer: PHP version not specified

Posted: Thu Jan 07, 2010 4:15 pm
by AbraCadaver
You need to add this to the top in the comment docs:

Code: Select all

* PHP Version 5
Or whatever version you require. It's not documented as far as I know and you would expect an @ but no.

Re: PEAR PHP_CodeSniffer: PHP version not specified

Posted: Thu Jan 07, 2010 4:43 pm
by jeff00seattle
Thanks, I just figured this out concurrently to your reply.

Code: Select all

 
<?php
/**
 * code.php
 * 
 * blah blah blah.
 * 
 * [b][color=#0000FF]PHP Version 5[/color][/b]
 
Jeff in Seattle