PHP Interpreter's code highlighting output

Source: Internet
Author: User
Tags ini php editor

Always like ue9 inside the default color settings for PHP, Orange Red, UE10 changed to the keyword blue, I changed back:

Now you want to try the Php.exe code highlight output in line with my preferences, carefully tuned 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
Here is the effect:

<?php
$a = ' 123 ';
$b = ' abc ';
?>
<table>
<tr><td>
<?php
Comments
if (true)
{
echo $a. $b;
}
?>
</td></tr>
</table>

Complement: But also can not only own appreciation, the code is for people to see, the Internet to see a lot of other color scheme, summed up:

1. That's just the ue9 style, keyword orange, variable crimson, string gray, notes dark green, HTML blue

2. Php.net official website All the code examples take the php.ini default configuration color, keyword green, string red, Comment orange, HTML black, plain text (variables and other identifiers) Blue:

Hold objects in a 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's weird. Most of the code in Pear's official website uses another color, keyword purple, string green, comment gray Plain text 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 not escape a color, is the MS vs style, many win under the PHP editor like to use, Ue10, Phpedit, devphp, zendstudio, keyword blue, annotation green, (sometimes there are string gray, digital red, etc.), other black



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.