Damit es im Klammerndschungel nicht zu langweilig wird…
Diese kennen wohl alle:
// not quite a bug, but a deliberate feature!
// do NOT fiddle unless you know what you are doing
* If this comment is removed the program will blow up
* I am not responsible of this code.
* They made me write it, against my will.
Auch das kennt man. Code, den man vor 2 Monaten geschrieben hat, kennt nur noch das Vergangheits-Ich.
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
Eine riesige Liste gibt es hier bei StackOverflow: What is the best comment in source code you have ever encountered?.
Leider mittlerweile ein geschlossener Thread, da er nicht dem typischen Q&A-Muster entspricht 😉
Was wäre, wenn PHP aus Großbritannien käme? Dann würde nämlich zu allererst $variable_name
zu werden £variable_name
, was wiederum in solchen Konstrukten resultieren würde:
switch ($variable) {
case $option1:
//Code here
break;
case $option2:
//Code here
break;
default:
//Code here
break;
}
wird zu
what_about (£variable) {
perhaps £possibility:
//Code here
splendid;
perhaps £other_possibility:
//Code here
splendid;
on_the_off_chance:
//Code here
splendid;
}
Mehr gibts hier: If PHP was British:
Sehr amüsant.