Home > Article > Backend Development > About PHPstorm usage tips phpstorm10.0 phpstorm activation code phpstorm usage tutorial
Updated slowly, accumulated little by little, are all the problems I encountered in use
Settings: (2016.4.15)
1: Annotation template, phpstorm has very powerful annotations The template can be changed at any time according to your own needs and set shortcut keys, which is very convenient
New file commentPHP File Header
<span><?<span>php </span><span>/*</span><span>* * Created by PhpStorm. * User: Administrator * Date: 2016/4/13 * Time: 22:44 </span><span>*/</span></span>
Class commentPHP Class Doc Comment
<span><span>/*</span><span>* * Class index * * @package application\controller * @VERSION 1.3 * @AUTHOR mask </span><span>*/</span><span>class</span> index <span>extends</span><span> controller {</span></span>
Function Doc CommentPHP Function Doc Comment
<span><span>/*</span><span>*获取配置类对象 *author : stubborRookie * * @return config *version :1.3 </span><span>*/</span><span>public</span><span>static</span><span>function</span><span> config() { </span><span>return</span><span>new</span><span> config(); }</span></span>
Customize your own templates:
File->setting->editor->File and code Templates You can set different display fields according to the rules inside Custom fields: Using your own name in comments is usually ${USER} But this default is the name of the computer, how can I change it to myself? Yes you can select the Includes tab, then click the + number in the upper left corner of the panel to create a new template and name it: PHP define (can be customized) extension php and then write the following code in it: Define the variable and assign the value, and introduce it in the template that needs to use the variable, such as: This is it! Input /** where you need to comment, such as the method name, and then press Ctrl+enter and the comment will be automatically completed! Editor font can be set in the editor. You need to make a copy in the settings to set it.
The above introduces the tips on using PHPstorm, including the content of phpstorm. I hope it will be helpful to friends who are interested in PHP tutorials.
<span><span>#</span><span>set ($VERSION="1.3")</span><span>#</span><span>set ($USER='stubbornRookie')</span></span>
<span><span>#</span><span>parse("PHP define.php")</span><span>/*</span><span>* author = ${USER}
*
* version =${VERSION}
</span><span>*/</span></span>