PhpStorm software configures the PHP language version

藏色散人
Release: 2021-08-03 15:07:11
forward
4602 people have browsed it

The following column phpstorm tutorial will introduce to you how to configure the PHP language version of PhpStorm. I hope it will be helpful to friends in need!

PhpStorm software configures the PHP language version

Problem Description

Generally speaking, the default PHP language version in PhpStorm is PHP 5.4, and PhpStorm will Files in the editor are automatically verified with this PHP version.

If we use the new features of PHP 7.0 (such as the null coalescing operator??) in the PHP file, then because PhpStorm cannot recognize the new feature when verifying the file, it will be in the corresponding location A warning sign (red wavy line) is displayed.

Although this will not have a big impact on our use of PhpStorm, this red warning looks unpleasant.

Solution

Modify the configuration of PhpStorm and adjust the PHP language version to PHP 7.0.

Click on the menu bar File → Settings → Languages ​​& Frameworks → PHP, change the value of the PHP language level drop-down list to 7, and click OK to save.

PhpStorm Introduction:

PhpStorm is a commercial PHP integrated development tool developed by JetBrains. It is designed to improve user efficiency, deeply understand user coding, and provide Smart code completion, fast navigation, and on-the-fly error checking. PhpStorm can help users adjust their coding, run unit tests or provide visual debugging functions at any time.

PhpStorm is written in Java. Users can extend the IDE by installing plugins created for PhpStorm or writing their own. The software also communicates with external sources such as XDebug.

All features available in WebStorm are included in PhpStorm, with added support for PHP and databases. WebStorm comes with pre-installed JavaScript plugins (such as Node.js).

Features:

  • ##PhpStorm provides a rich code editor [9] for PHP, with syntax highlighting, extended code format configuration, On-the-fly error checking and code completion.

  • PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 support, including generators, coroutines, finally keyword, list in foreach, pair function Call results using empty() and other expressions, traits, closures, class member access on instantiation, short array syntax, array dereferencing on function calls, binary literals, expressions in static calls, it supports return types and scalar type hints and constant visibility, etc. It can be used in both modern and legacy PHP-based projects.

  • Code auto-completion finalizes class, method, variable names, and PHP keywords, as well as common names for fields and variables, depending on their type.

  • Coding style support (PSR1/PSR2, Drupal, [10] Symfony, Zend).

  • PHPDoc support. The IDE provides code completion suggestions based on @property, @method, and @var annotations.

  • Duplicate code detector.

  • PHP code sniffer (phpcs) to instantly check for code smells.

  • Refactoring (rename, introduce variables, introduce constants, introduce fields, inline variables, move static members, extract interfaces).

  • Smarty and Twig template editing (syntax error highlighting; Smarty function and property completion; automatic insertion of pairs of braces, quotes, and closing tags; and more).

  • MVC view for Symfony and Yii framework.

  • PHAR support.

The above is the detailed content of PhpStorm software configures the PHP language version. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template