PHP interpreter code highlighted

Source: Internet
Author: User
I have always liked the default color settings for php in ue9, orange and red, and changed ue10 to the blue keyword. I have changed it back: now I want to try php.exe to highlight the code and make it consistent with my preference, I carefully tuned php. ini, and tried some new colors: highlight. string # 808080highlight. comment # 008000highlight. keyword has always liked the default color settings for php in ue9, orange and red, and changed ue10 to the keyword blue. I changed it back:

Now I want to try php.exe to make the code highlighted and output consistent with my preference. I carefully adjusted php. ini and tried some new colors:

Highlight. string = #808080
Highlight. comment = #008000
Highlight. keyword = # FF8000
Highlight. bg = # E0E0E0
Highlight. default = #800000
Highlight.html = # 0080FF

Then php-q-s test. php> test.html
The following figure shows the effect:

$ A = '000000 ';
$ B = 'abc ';
?>




// Comments
If (true)
{
Echo $ a. $ B;
}
?>

Supplement: But you can't just appreciate it. the code is for you. you can see many other color schemes on the internet. here is a summary:

1. That's exactly the ue9 style. The keyword is orange, the variable is dark red, the string is gray, the comment is dark green, and the html is blue.

2. All the code examples on the php.net official website use the default configuration color of php. ini, the Green keyword, the string red, the annotation Orange, the html Black, the ordinary text (variable and other identifiers) blue:

// How to hold objects in an arrayList and retrieve it //
// Interface implementation //

Class Data {

Public $ Name;
Public $ Age;
Public $ Address;

Public function _ construct ($ Name, $ Age, $ Address ){
$ This-> Name = $ Name;
$ This-> Age = $ Age;
$ This-> Address = $ Address;
}

Public function _ destruct (){
Echo "Default Constructor... \ n ";
}

}

3. It is strange that most of the code on the pear official website uses another color, the keyword is purple, the string is green, and the comment is gray and the plain text is blue:

// Create a Cache_Lite object
$ Cache_Lite = new Cache_Lite ($ options );

If ($ data = $ Cache_Lite-> get ('block1 ')){
Echo ($ data );
} Else {
$ Data = 'data of the block 1 ';
$ Cache_Lite-> save ($ data );
}

4. Of course, we still cannot escape a color, that is, the ms vs style. many php editors under win like to use it, such as ue10, phpedit, devphp, zendstudio, and others. The keywords are blue, and annotations are green, (sometimes there are strings in gray, numbers in red, etc.), Other Black

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.