top | item 2906480

If PHP Were British

347 points| shdon | 14 years ago |addedbytes.com | reply

104 comments

order
[+] wbhart|14 years ago|reply
If it were truly British then upon an exception it would apologise excessively and offer to dust you off.

Queues would also be ubiquitous. Data could not be accessed in order, but would have to be retrieved from an unordered queue, which would necessarily involve a long wait.

There would also be a congestion charge for drivers at certain hours of the day and interfacing with Rails would cause unexpected delays.

[+] gmac|14 years ago|reply
Hmm. Queuing might well be ubiquitous but data would be accessible only in meticulous order: from the head of a queue and from nowhere else.
[+] sesqu|14 years ago|reply
unordered queue

What is that? Do you mean a regular, non-priority, queue?

[+] halostatue|14 years ago|reply
Funny, but completely ignorant of the fact that Canadian English is distinct from Amrican English. We generally spell it 'colour' here, but draw the line at 'connexion', and have two spellings for 'seriali[sz]e', depending on the audience and style guide you follow. Joe Clark has a wonderful book about this, Organizing Our Marvellous Neighbours (http://en-ca.org/).
[+] rll|14 years ago|reply
Yeah, the opening paragraph to this one lost me. I have a Canadian passport and I was living in Canada at the time and we spell it "colour" there. But yes, I chose to go with American English over Canadian/Danish/Inuktituk simply because I was already used to that from other languages. Like others have mentioned, non-American programmers don't tend to think of the terms in programming languages as an extension of the language, but simply as tokens that do things. Having those tokens consistent across languages makes sense.
[+] cperciva|14 years ago|reply
Interestingly, Canadian English is almost en-GB-oed -- which is the closest thing the world has to "international standard English", seeing as it's the dialect preferred by both the United Nations and the International Organization for Standardization,
[+] corin_|14 years ago|reply
I find myself getting genuinely annoyed when having to write things like "color" in CSS.

I wonder, though, as fun as it is to think about these jokes, what serious implications it had. Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

[+] citricsquid|14 years ago|reply
really? I'm British and I'm quite amazed at how I can (without ever thinking about it) switch between colour and color. I wonder if maybe some people approach programming as a different language (eg: color isn't colour, it's color, it is a unique thing) and then some approach it as an extension of their own language.
[+] tristanperry|14 years ago|reply
When I was younger it'd annoy me. I'd always forget and slip back into writing colour. Then I'd wonder why the text or background colour of something wasn't changing. A few minutes later (of checking I was editing the right file, that I was changing the property of the right id/class, etc etc!), I'd finally realise I was simply 'misspelling' it. DOH!

Now, though, things have clicked and I find I can very easily switch between color and colour when needed.

Even to the point that if I'm typing on a US based site, I tend to use color (and Americanized spellings), and on non-US sites I tend to British spelling. Can take a while to get used to though.

Anywhoo, I loved this blog post :) Especially the:

Words fail me at this point. How is any self-respecting gentleman expected to make head or tail of these "words". It beggars belief that anyone could allow such distortions of words to be entered into a programming language. They, along with the myriad of similar errors, should be reverted to their proper forms immediately:

Bit!

[+] randlet|14 years ago|reply
I write a fair bit of wxPython code and one of the things that always struck me as surprising is that you can use widget.Color or widget.Center interchangeably with widget.Colour and widget.Centre!
[+] abhaga|14 years ago|reply
> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

I cannot see £ sign on my keyboard, so that would be slightly inconvenient. :)

[+] rbanffy|14 years ago|reply
> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

I think that had more to do with the $ usage in Perl rather than with currencies.

[+] Sodaware|14 years ago|reply
The biggest problem would be that the £ symbol is not on US keyboards. The # symbol takes its place, but is called the pound sign rather than hash.
[+] j_col|14 years ago|reply
Brilliant! Given my sadness today around HP destroying the mobile platform I love (webOS), this has really cheered me up ;-) I especially like the cheerio() function.
[+] AlexC04|14 years ago|reply
I too thought it was brill. Next, lets play "if PHP were cockney"
[+] tarkin2|14 years ago|reply
$ is superior though, simply for its ease of access using the left index finger.

£ would require the use of the middle finger.

To British sensibilities, it would mean swearing at PHP on every variable declaration! Actually, that said...

[+] benjoffe|14 years ago|reply
£ isn't even available on my keyboard, I would need specific software or IDE features just for this.
[+] __rkaup__|14 years ago|reply
On my UK keyboard, $ is <shift-4> and £ is <shift-3>. They're right next to each other.
[+] lubutu|14 years ago|reply
The only language I know which actually uses "colour" in its standard library, is Occam, designed in Bristol. Are there any others?

(Nitpick: "socialize" is the original spelling; "socialise" was a change in spelling on our side of the pond.)

[+] corin_|14 years ago|reply
There's actually many cases where we (Brits) hate on the American version without realising that actually theirs is the version we were using back when we sent people over to America, and it is us we have changed over the years not they. Still annoys me though :)
[+] pash|14 years ago|reply
The large majority of -ize/-ise verbs come from Greek words ending in -ιζειν [-izein] (sometimes via Latin, in which they end in -izare). English adopted many of these words via the French, which lacks "Z" as a native letter, and so the -ise spelling.

Americans reverted to the -ize spelling on the principle of spelling words as they sound (a foreign concept to the language, we must all agree), and much of educated Britain likewise used the -ize spelling on etymological grounds. (Thus Oxford spelling [en-GB-oed].) Esteemed English institutions such as the Oxford University Press and Cambridge University Press still use the -ize spelling, as did The Times, until it came to be perceived as an Americanism in the 1980s.

International English, such as that used by the United Nations, follows Oxford spelling and so uses -ize.

[+] mahmud|14 years ago|reply
The British dialects of English have undergone far more change than English elsewhere. Some British dialects were heavily influenced by French, or imitated the francophone "upper" classes so much so that they no longer trill their 'r'. [Citation Needed]

Also, India preserves the vocabulary of the old English bureaucracy, now lost in Britain. [Citation Needed]

[+] pestaa|14 years ago|reply
Ogre 3D (C++ library for realtime graphics) also uses the word colour, designed by a bright guy from Channel Islands, South England.
[+] pointyhat|14 years ago|reply
BBC BASIC, which does the reputable thing of accepting it both forms equally.
[+] uriel|14 years ago|reply
And if PHP was Japanese it would commit Seppuku.
[+] thelovelyfish|14 years ago|reply
If it were British there would be alcohol involved somehow.
[+] voyou|14 years ago|reply
We're talking about PHP, so I think we can take it as read that there was substance abuse involved somewhere.
[+] premchai21|14 years ago|reply
preg_match might actually be better expanded as practical_extraction_and_reporting_language_regular_expression_match. (I'd comment on the original but it's currently too overloaded for it, I gather.)
[+] ojbyrne|14 years ago|reply
Actually, my understanding is that the p in preg actually stands for perl. php.net refers to PCRE (Perl Compatible Regular Expressions).
[+] rbanffy|14 years ago|reply
"pathologically_eclectic_rubbish_lister_regular_expression_match" would be my first choice.
[+] justincormack|14 years ago|reply
Not overloaded, just form an orderly queue and wait please.
[+] DaveChild|14 years ago|reply
I moved the site to Linode and set my swap incorrectly, so as soon as the memory ran out it fell over. Oops.
[+] code_duck|14 years ago|reply
yeah, where does 'perform' come from?
[+] fdb|14 years ago|reply
He does have a point with the abbreviations.

The use of abbreviations and underscores in PHP is maddeningly inconsistent.

Example:

  pdf_stringwidth
  strlen
  str_replace
[+] reinhardt|14 years ago|reply
How long until some bored hacker writes a british<->us PHP compiler and posts it here? I give it a week.
[+] jordinl|14 years ago|reply
A colleague once complained because I wrote 'initialize' with a z...
[+] cafard|14 years ago|reply
If we change the sigils, can we refer to objects as "quiddities"?
[+] georgieporgie|14 years ago|reply
I always thought the dollar sign originated as a variable marker because it was used in BASIC to mark a string. Is there an earlier origin?