Home > Backend Development > PHP Tutorial > About PHPstorm usage tips phpstorm10.0 phpstorm activation code phpstorm usage tutorial

About PHPstorm usage tips phpstorm10.0 phpstorm activation code phpstorm usage tutorial

WBOY
Release: 2016-07-29 08:53:27
Original
1308 people have browsed it

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>
Copy after login

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>
Copy after login

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>
Copy after login

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:

<span><span>#</span><span>set ($VERSION="1.3")</span><span>#</span><span>set ($USER='stubbornRookie')</span></span>
Copy after login

Define the variable and assign the value, and introduce it in the template that needs to use the variable, such as:

<span><span>#</span><span>parse("PHP define.php")</span><span>/*</span><span>* author = ${USER}
*
* version =${VERSION}
</span><span>*/</span></span>
Copy after login

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.

Related labels:
source:php.cn
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