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
PEAR PHP_CodeSniffer: PHP version not specified
Moderator: General Moderators
-
jeff00seattle
- Forum Commoner
- Posts: 66
- Joined: Sat Feb 28, 2009 3:27 pm
- 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
You need to add this to the top in the comment docs:
Or whatever version you require. It's not documented as far as I know and you would expect an @ but no.
Code: Select all
* PHP Version 5mysql_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
Thanks, I just figured this out concurrently to your reply.
Jeff in Seattle
Code: Select all
<?php
/**
* code.php
*
* blah blah blah.
*
* [b][color=#0000FF]PHP Version 5[/color][/b]