Author: Rongze Wei, Du Honglin welcome communication, please respect the copyright, please ensure that posted the full article.
Recently, in the accidental opportunity to find PHP naming rules to '[A-ZA-Z_ / X7F- / X7F- / XFF] *' is saying A to Z, and A to z, and _, and 0x7f to 0xFF characters are supported by naming rules, that is, in the PHP program, most of the Chinese characters can be used to actually name!
After testing, this surprise allows us to directly DOTNET technology today! We can use Chinese characters to class, functions, and variables! That is, the current DOTNET development also supports such naming rules!
If this finding, it is indeed universal application, which will promote the Chinese culture of the program code, and quickly reach a new stage. Even we think that you can directly translate the pseudo code into actual program code!
Attached 1: C # .NET code
Using system;
Namespace consoleApplication1 ///
/ / Oh, suspend console.read ();}}}
After testing, the following code can be compiled correctly in the W2K Professional DotNet Framework environment.
Attached 2: PHP code
PHP
Class smile {
Var $ 要 = = NULL;
Function says () {echo "Welcome to the Chinese PHP World!
". 话;}
$ Smile = New smile; $ smile -> Say ("I hope this finding can effectively promote the program code culture!
- Rong Zewei, Du Honglin");
?>
After testing, the following code can operate correctly in the W2K Server PHP4.3 pre-environment.