When RasmusLerdorf (father of php) was about to integrate php, he was very smart and did not choose to write it in plain or Danish, although he has the lineage of both countries. This is very good, otherwise everyone would not like to use this computer language. Instead, he chose the local language because he was in Canada. No
When Rasmus Lerdorf (father of php) was about to integrate php, he was very clever and did not choose to write it in plain or Danish, although he has the lineage of both countries. This is very good, otherwise everyone would not like to use this computer language. Instead, he chose the local language because he was in Canada. No
When Rasmus Lerdorf (father of php) was about to integrate php, he was very smart and did not choose to write it in plain or Danish, although he has the lineage of both countries. This is very good, otherwise everyone would not like to use this computer language. Instead, he chose the local language because he was in Canada. No, it's not French, it's a hybrid dialect of Queen English, which is called "American English ".
Since then, php developers in the UK have been complaining about this. What is he thinking? More importantly, how can we recover this tragedy? Even in this digital age, as developers, how can we ensure that the traditions of the British Empire are carried forward?
Awesome
$ Variable_name
First of all, this may be the most important change that needs to be made. If we can remove this beloved symbol from the United States, we can replace it with a more elegant and reliable one, more... to give people a more noble enjoyment.
£Variable _ name
Let's get started.
Today, how many British programmers are blocked by an extremely informal language when preparing to write programs in this simple but vulgar American php language, the common saying is "Hello World )". If you use another more solemn and formal opening, more young British talents will be able to know British English, at the same time, it can bring a more elegant air to the broad society.
Abbreviations
The most painful thing for British people is the inappropriate abbreviations. There are no acronyms on the streets of London, because the grammar teachers with the most pure English education are not allowed to send text messages in this way, "c u soon traffic kthxbye: see you soon, I got traffic, OK, thanks, bye, meaning, a meeting, a congestion on the road, a chat) and so on, but it will be completely spelled out, "Dear Sir/Madam, I will arrive as soon as possible within an hour. I promise it will work at full capacity. ." (Yes, that's it. Write it slowly. We don't like others pushing us)
However, php syntax is filled with unnecessary acronyms and acronyms.
Str_replace () is_int () var_dump () preg_match () json_encode () mysql_connect ()
Make the following corrections:
String_replace () is_integer () variable_dump () perl_regular_expression_match ()
Javascript_object_notation_encode () my_structured_query_language_connect ()
Eloquence
If ($ condition) {// Code here} else {// Code here}
If Shakespeare had lived to this day, he would have been ashamed to see that his native language was malformed to the point where it was so strange. In the context, the proper conciseness is commendable, especially in some places that are not noticeable, rather than this sentence. "If... else" is the most common traditional syntax in php. It must be as flawless as possible. There are many other phrases that can replace it, but below is the most suitable:
Perchance (£condition) {// Code here} otherwise {// Code here}
Spelling
Imagecolorallocate () serialize () newt_centered_window () connection_status ()
This time I am broken down by words. No self-respecting gentleman can spell the word head or end in this way. This seems to make everyone mistakenly think that anyone can make spelling mistakes when developing a programming language. The errors in this sentence and other similar magnificent errors must be corrected immediately.
Imagecolourallocate () serialise () newt_centred_window () connexion_status ()
Polite terms
Try {// Code here} catch (Exception $ e) {// Handle exception die ('message ');}
The "try... catch" module is the most typical example of a lack of courtesy in php. It is too straightforward to appear in the new version of php. In addition, the word "die" is too disappointing. The new statement below, despite being lengthy, is very polite and goes to the Hall:
Would_you_mind {// Code here} actually_ I _do_mind (Exception £e) {// Politely move on cheerio ('message ');}
Category
Perhaps the most important thing rooted in British psychologists is the interpretation of the classification concept, although php has almost no chance to make some changes, however, the changes mentioned here are very important.
Class Republic {public $ a; private $ B; protected $ c ;}$ example = new Republic
First, it is unacceptable that classes in the current php system do not have class hierarchy. Therefore, we must classify the existing classes-upper class, middle class, and working class-and, without the explicit permission of the first class, none of the classes can obtain the storage methods of the first class. (Of course, although they will also come into contact with the methods of the second class, they will not become true members of this class, it is also impossible to enter other lower classes by virtue of their own power ). "Public" and "private" can be changed as synonyms in the British class system (such as the school system naming method ). So these must be corrected, and the property Protected by "Protected" should also be made public for generations. Although the word "new" is still justified, there are also a bunch of alternative words.
Upper_class Empire {state £a; private £b; hereditary £c;} £example = nouveau Empire;
We are the daily empire...
Everyone hopes that these simple changes will improve the prestige and position of php in many programming languages. Instead of making him a cousin of a poor American, let him sit on a Diaoyutai in English scripting language.