14

I spent hours on Google searching for an answer too this before asking, in phpcs I had this error "PHP version not specified", but I couldn't find an answer on Google, eventually I've just came across this "PHP Version 5" which cleared the error up, but I'm baffled as PHP 5 is out of date, I'm on PHP 7.2.10.

If anyone could shed light on this I'd much appreciate it, many thanks.

Edit: I've just added the @ lines at the top, and it breaks the "PHP Version 5" as it's saying "PHP version not specified".

  • @category
  • @package
  • @author
  • @license
  • @link
  • PHP version 5
5
  • Maybe this can help you. hashbangcode.com/article/… Commented Oct 24, 2018 at 7:20
  • thanks, but it didn't fix the issue Commented Oct 24, 2018 at 7:27
  • you check also with *PHP Version 5 with uppercase in v? Commented Oct 24, 2018 at 7:30
  • I have yeah, both upper and lowercase Commented Oct 24, 2018 at 7:57
  • To let the sniffs know what version of PHP you are targeting, the php_version configuration option can be used. $ phpcs --config-set php_version 50403 check on: github.com/squizlabs/PHP_CodeSniffer/wiki/… Commented Oct 24, 2018 at 8:01

1 Answer 1

20

enter image description here

"php version" All letters will be in lower case

* php version 7.2.10

* Must be placed before @tags

Sign up to request clarification or add additional context in comments.

1 Comment

Apparently, the letters don't have to be all lower case, so 'PHP version 8.1.1' works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.