
If PHP Were British - shdon
http://www.addedbytes.com/blog/if-php-were-british/
======
wbhart
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
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.

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

~~~
joshaidan
Yeah, it makes me wonder if we'll ever see a programming language that uses
"colour." Are there any out there? We must do something to reverse this
trend!!!

~~~
Kliment
Wx uses "colour" everywhere:

<http://www.wxpython.org/docs/api/wx.Colour-class.html>

------
BerislavLopac
I'm amazed that no comment has yet mentioned my favo(u)rite take on the
subject, the immortal Lingua::Romana::Perligata
[http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata....](http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html)
;)

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

~~~
polymatter
Also a Brit here. I used to get annoyed, but eventually I think it seeped into
my system as a different language as you put it. About 2 years ago I had a
colleague get very angry with me for writing code analogous to:

Color colour = new Color();

To me, it makes perfect sense, and tbh didn't realise I was even doing it. I
definitely endorse everyone standardising on American spelling though, now its
been pointed out to me.

~~~
copper
Strangely, I do that too. I tend to blame my education :)

Amusingly enough, (though not strange, if you consider its origins) Haskell
uses the British spelling. Off the top of my head, the colour types are
defined in the Data.Colo _u_ r module.

~~~
ender7
After seeing him give a talk, I've come to the conclusion that Simon Peyton-
Jones is possibly the most British man alive.

~~~
amirhhz
If anyone is interested:

[http://ontwik.com/haskell/simon-peyton-jones-a-taste-of-
hask...](http://ontwik.com/haskell/simon-peyton-jones-a-taste-of-haskell/)

I don't know if this is the one you meant, but I watched it a while ago and I
think it's well worth the time: SPJ is great to listen to and you actually
pick up a good amount Haskell and functional concepts.

------
j_col
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
I too thought it was brill. Next, lets play "if PHP were cockney"

~~~
justincormack
we could replace the semicolon with "innit!"

$oranges = "lemons" innit!

~~~
FuzzyDunlop
I prefer the Manc version of PHP (which syntactically has bugger all in common
with PHP coz thats how we roll in Manc):

    
    
        alright ar kid?
          im not being funny but x = y
          z is like 10 * 10 int it
          
          you got a spare minute?
             can you just do this for us
                // codage
             while im sorting this out
                // conditionage
          ta son
    
          if /*function*/ is acting the goat
              bloody_nora (error)
          
          summat wrong? nah : damn fucking right flower

------
tarkin2
$ 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
£ isn't even available on my keyboard, I would need specific software or IDE
features just for this.

~~~
uxp
I agree that ease of accessibility of the key is very important in choosing a
variable symbol.

The first time I ever stepped into ERB, typing <% was a chore, since it was
just a bit further than I had been used to typing tag characters. For en_US
Americans on OS X, the £ character is a simple Option+3 though. Can anyone
tell me what the key combination for the character is on en_US Windows
platforms?

~~~
benjiweber
I'm always amazed how hard it is to type a | pipe on an american keyboard. On
British keyboards it's next to left shift so you can type it with just one
keystroke.

~~~
w1ntermute
Oh god, I had to use a British keyboard while working on a project this
summer, and that damn backslash/pipe key next to the left shift was the bane
of my existence. I don't know how many times I accidentally hit that when
trying to hit the left shift. Why would you _ever_ put it there?

And the tall Enter key - uggh, why? Even if you need an extra key because of
the pound symbol, you could just put it where the backslash/pipe key normally
goes, instead of having a misshapen Enter key. And swapping " and @ -
completely nonsensical. ' and " should be on the same key.

~~~
thristian
As I recall, the UK keyboard layout was designed to allow entry of every
character in the ASCII and EBCDIC character-sets, which explains why it
includes "¬" and both vertical bar ("|") and broken bar ("¦").

Putting double-quote above "2" makes perfect sense if you've ever looked at an
ASCII table. A lot of 8-bit micro-computers did that, even in America - for
example, the Apple II.

~~~
w1ntermute
> As I recall, the UK keyboard layout was designed to allow entry of every
> character in the ASCII and EBCDIC character-sets, which explains why it
> includes "¬" and both vertical bar ("|") and broken bar ("¦").

Seems kind of pointless. If you're going to include some extra keys, how about
a few Greek letters, or accented English letters (without AltGr)? Of course,
that's not to say there aren't pointless keys on the US English keyboard (what
the hell is "`" for?).

> Putting double-quote above "2" makes perfect sense if you've ever looked at
> an ASCII table.

But there's no reason to base the keyboard layout on ASCII tables. The
keyboard should be designed to be as intuitive as possible, rather than
staying true to some obscure technical details.

~~~
thristian
Presumably they didn't include any Greek or other letters because they weren't
in the basic ASCII or EBCDIC sets. I guess they wanted their keyboard to be
standard across both kinds of computers: micros and mainframes.

------
lubutu
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_
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 :)

~~~
mahmud
America is a preservation jar for per-Enlightenment Britain.

------
mambodog
Google cache link:
[http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://www.addedbytes.com/blog/if-
php-were-british/&hl=en&strip=1)

------
uriel
And if PHP was Japanese it would commit Seppuku.

------
thelovelyfish
If it were British there would be alcohol involved somehow.

~~~
voyou
We're talking about PHP, so I think we can take it as read that there was
substance abuse involved somewhere.

~~~
thelovelyfish
lolz

------
premchai21
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
Actually, my understanding is that the p in preg actually stands for perl.
php.net refers to PCRE (Perl Compatible Regular Expressions).

~~~
premchai21
Yes, and “Perl” has often been expanded as “Practical Extraction and Reporting
Language” (I don't recall whether this is a half-joke or not, but I think it
is).

If you like you can add the “compatible” though, which would conveniently add
to the length.

~~~
tingletech
$ perldoc perl

    
    
      NAME
           perl − Practical Extraction and Report Language
    

...

~~~
fferen
From Wikipedia: "There is some contention about the all-caps spelling "PERL",
which the documentation declares incorrect[28] and which some core community
members consider a sign of outsiders.[29] The name is occasionally backronymed
as Practical Extraction and Report Language, which appears at the top of the
documentation[27] and in some printed literature.[30]"

<http://en.wikipedia.org/wiki/Perl#Name>

------
fdb
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
How long until some bored hacker writes a british<->us PHP compiler and posts
it here? I give it a week.

------
jordinl
A colleague once complained because I wrote 'initialize' with a z...

------
cafard
If we change the sigils, can we refer to objects as "quiddities"?

------
zandorg
In Common Lisp, 'Fourth' is the fourth item in a list, rather than 'Forth'.

~~~
tricolon
Why would one spell it 'forth'?
[http://en.wikipedia.org/wiki/English_numerals#Ordinal_number...](http://en.wikipedia.org/wiki/English_numerals#Ordinal_numbers)

~~~
arethuza
Presumably confusion with the river named after the progamming language.

------
georgieporgie
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?

------
4J7z0Fgt63dTZbs
Now if PHP were Japanese?

------
PedroCandeias
Joke about php devs not being savvy enough to actually go and make these
changes in 3... 2... 1...

