PEAR PHP_CodeSniffer: PHP version not specified

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
jeff00seattle
Forum Commoner
Posts: 66
Joined: Sat Feb 28, 2009 3:27 pm

PEAR PHP_CodeSniffer: PHP version not specified

Post 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
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: PEAR PHP_CodeSniffer: PHP version not specified

Post 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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
jeff00seattle
Forum Commoner
Posts: 66
Joined: Sat Feb 28, 2009 3:27 pm

Re: PEAR PHP_CodeSniffer: PHP version not specified

Post 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
Post Reply