Named in Chinese, so that Chinese characters go to program development _php

Source: Internet
Author: User
Program Development

Recently in the occasional opportunity and friends found PHP naming rules for \ ' [a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*\ '
That is, A to Z, and A to Z, and _, and 0x7f to 0xFF characters are supported by the naming rules, that is, in the PHP program, you can directly use most of the Chinese characters for the actual name!

After testing, this surprised us to the dotnet technology of today's carefree!
We can use Chinese characters to name classes, functions, variables!
That said, now the dotnet development also supports such a naming convention!

If this discovery is indeed universally applied, it will promote the procedural code of the medium culture and quickly reach a new stage.
Even we consider that the pseudo code can be directly translated into the actual program code!

Attached 1:c#.net code

Using System;

Namespace ConsoleApplication1
///
The class class is a middle-name instance of a class named Test
///
Class
{

static void display (string character)
{Console.Write (\ "Wish 16 grand victory to hold!\" + character);
}
///
The main entry point for the application.
///
[STAThread]
static void Main (string[] args)
{
//
TODO: Add code here to launch the application
//
String I am the strings;
I am the string = \ "-Du Honglin, Rongsewei \";
Display (I am a string);

Oh, pause for a moment
Console.read ();
}
}
}

After testing, the following code can be compiled and run correctly in the W2K Professional + DotNet Framework environment.

Attached 2:php code

Class Smile {
var $ what to say = null;
function says ($) {
echo \ "Welcome to the Chinese PHP world!"
\" . $ words;
}
}
$ smile = new Smile;
Smile and say (\ "Hope this discovery can be effective in advancing the code of the program culture!") _

--Rongsewei, Du Honglin \ ");
?>

After testing, the following code works correctly in the W2K Server + PHP4.3 pre environment.

  • 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.