• DimWit (unregistered) in reply to highphilosopher
    highphilosopher:
    valentin:
    do you get any points for being an idiot?

    Yes he does, since the two of you are arguing, and you're code doesn't even compile.

    --- WITH WTF ---

    array_merge(range('A','Z'), array('!'))

    --- WITHOUT WTF ---

    $letter_array = array_merge(range('A','Z'), array('!'));

    interesting captcha: dolor - Pain, Misery, Grief

    This captcha thing is better than any psychic I've seen yet!

    I hate Php that doesn't compile!!

    ;)

  • highphilosopher (unregistered) in reply to notromda
    notromda:
    I like Ruby:

    ('A'..'Z').collect + ['!']

    Ok, apparently from this post you would perform the same WTF, but you prefer to do it in a different language. Is that really the post you wanted to post?

  • Magnus Bergmark (unregistered)

    To everyone saying it was dull: Yeah, but so what? I sent it in because I thought it was funny how redundant it was, not because I thought it would give anyone a revelation. :-)

    I have some other snippets planned for later submissions, most of them containing irony or other things. Nothing earth shattering, but I come here for a laugh, not to get depressed.

  • Silverhill (unregistered) in reply to EatenByAGrue

    How about The Quarrymen? ;-)

  • Silverhill (unregistered) in reply to EatenByAGrue

    (meant to include quote, above...)

    EatenByAGrue:
    A group called "The Originals"? Huh, I wonder if they had to change their name to "The New Originals", or maybe "The Thamesmen"?
    How about The Quarrymen? ;-)
  • Laughing Jack (unregistered) in reply to hdgjhd+
    hdgjhd+:
    We need a LetterFactory. And XML. And a neural network. Garglepussy!
    We'll have to do it in Java then. Diagrams! We need diagrams!
  • Laughing Jack (unregistered) in reply to ContraCorners
    ContraCorners:
    There's a point to this site?
    Yes, posturing in the comments.
  • Laughing Jack (unregistered) in reply to Magnus Bergmark
    Magnus Bergmark:
    ...Nothing earth shattering, but I come here for a laugh, not to get depressed.
    We're programmers, we have egos, not a sense of humor :-|
  • EmperorOfCanada (unregistered)

    My WTF is what is the problem with invalid HTML4. If it works in the common browser then it passes the most important test of all. Maintainability and other tests come next. HTML nazis don't last long at my company.

  • Ouch! (unregistered) in reply to EmperorOfCanada
    EmperorOfCanada:
    My WTF is what is the problem with invalid HTML4. If it works in the common browser then it passes the most important test of all. Maintainability and other tests come next. HTML nazis don't last long at my company.
    But it doesn't. And it's not maintainable either. Phreaking Phook, that's one of the few things xhtml gets right: if it doesn't parse, don't bother with the crap.
  • (cs) in reply to Ouch!
    Ouch!:
    EmperorOfCanada:
    My WTF is what is the problem with invalid HTML4. If it works in the common browser then it passes the most important test of all. Maintainability and other tests come next. HTML nazis don't last long at my company.
    But it doesn't. And it's not maintainable either. Phreaking Phook, that's one of the few things xhtml gets right: if it doesn't parse, don't bother with the crap.
    That's also one of the things that xhtml gets badly wrong: you now need to sanitize all user input to make sure it's valid xhtml. If you miss even one input anywhere, it's possible for a careless user to break your site, possibly to the point of requiring direct database access to fix it.
  • Joseph (unregistered) in reply to Gramma
    Gramma:
    highphilosopher:
    Should have been This:

    $abcdefghijklmnopqrstuvwxyz!_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!");

    You missed a letter.

    You made me waste 2 minutes looking for a ltter that isn't not there.

  • bAILEY (unregistered) in reply to DimWit
    DimWit:
    highphilosopher:
    valentin:
    do you get any points for being an idiot?

    Yes he does, since the two of you are arguing, and you're code doesn't even compile.

    --- WITH WTF ---

    array_merge(range('A','Z'), array('!'))

    --- WITHOUT WTF ---

    $letter_array = array_merge(range('A','Z'), array('!'));

    interesting captcha: dolor - Pain, Misery, Grief

    This captcha thing is better than any psychic I've seen yet!

    I hate Php that doesn't compile!!

    ;)

    Ah, Touche'!!

  • Maurits (unregistered) in reply to Carnildo
    Carnildo:
    you now need to sanitize all user input to make sure it's valid xhtml

    Well up-trollmanshipped.

  • (cs) in reply to Drew
    Drew:
    "!" is not a letter! D:
    It's a terminator, so you can use a loop to do an array lookup.
  • burpy (unregistered) in reply to SenTree
    SenTree:
    Drew:
    "!" is not a letter! D:
    It's a terminator, so you can use a loop to do an array lookup.

    Sarah Connor?

  • (cs) in reply to burpy
    burpy:
    SenTree:
    Drew:
    "!" is not a letter! D:
    It's a terminator, so you can use a loop to do an array lookup.
    Sarah Connor?
    Summer Glau.
  • captain obvious (unregistered) in reply to Joseph
    Joseph:
    Gramma:
    highphilosopher:
    Should have been This:

    $abcdefghijklmnopqrstuvwxyz!_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!");

    You missed a letter.

    You made me waste 2 minutes looking for a ltter that isn't not there.
    That'd be the point dumb fuck

  • (cs) in reply to highphilosopher
    highphilosopher:
    valentin:
    do you get any points for being an idiot?

    Yes he does, since the two of you are arguing, and you're code doesn't even compile.

    Neither does "you're" English.

  • Anonymous (unregistered)

    TRWTF is the fact that they used double quotes to encapsulate single character strings, forcing the PHP compiler waste time looking for variables in each single character string of the array ...

    at least they didn't assign the characters from ASCII:

    $letter_array = array(
         chr(65), //A 
         chr(66), //B
         chr(67), //C
         chr(68), //D
         chr(69), //E
         chr(70), //F
         chr(71), //G
         chr(72), //H
         chr(73), //I
         chr(74), //J
         chr(75), //K
         chr(76), //L
         chr(77), //M
         chr(78), //N
         chr(79), //O
         chr(80), //P
         chr(81), //Q
         chr(82), //R
         chr(83), //S
         chr(84), //T
         chr(85), //U
         chr(86), //V
         chr(87), //W
         chr(88), //X
         chr(89), //Y
         chr(90), //Z
         chr(33)  //!
    );
    
  • Billy (unregistered)

    Hm, never saw anyone mention the obvious TRUE way to do this MUHAHAHA :

    $array = 'abcdefghijklmnopqrstuvwxyz!'; $array[0] == 'a' :D

  • Bob (unregistered) in reply to Zylon
    Zylon:
    For the love of god, can we please finally let "developmesuction" or "devildestruction" or "devoreunion" or whatever the hell it is finally die? It is to neologisms what ADA was to programming. What IE was to web standards. What Trespasser was to gaming. What Cat in the Hat was to film. What My Mother the Car was to sitcoms. What iSnack2.0 was to food. Just let it die. In the name of all that is holy... let it die.

    iDon't iThink iWe iWill.

  • opto (unregistered) in reply to Carnildo
    Carnildo:
    Ouch!:
    EmperorOfCanada:
    My WTF is what is the problem with invalid HTML4. If it works in the common browser then it passes the most important test of all. Maintainability and other tests come next. HTML nazis don't last long at my company.
    But it doesn't. And it's not maintainable either. Phreaking Phook, that's one of the few things xhtml gets right: if it doesn't parse, don't bother with the crap.
    That's also one of the things that xhtml gets badly wrong: you now need to sanitize all user input to make sure it's valid xhtml. If you miss even one input anywhere, it's possible for a careless user to break your site, possibly to the point of requiring direct database access to fix it.
    Holy fsck, i almost fell for this troll.
  • Alan (unregistered)

    Maybe I'm being daft, but where's the WTF in having an array of letters? I could see someone use it for random passwords or IDs.

    Sure, there's a punctuation mark in it, which makes the name technically incorrect, but that's more of a semantic fluke than a real WTF.

    The comment is pretty useless, but even that is hardly TDWTF-worthy.

    Sure, most people would generate the alphabet (if only with a quick loop) rather than type it out and risk typos, but that's not exactly WTF-y either.

    So the real WTF is TDWTF?

    CAPTCHA: minim, as in "minim WTFness"?

  • (cs) in reply to Bob
    Bob:
    Zylon:
    For the love of god, can we please finally let "developmesuction" or "devildestruction" or "devoreunion" or whatever the hell it is finally die? It is to neologisms what ADA was to programming. What IE was to web standards. What Trespasser was to gaming. What Cat in the Hat was to film. What My Mother the Car was to sitcoms. What iSnack2.0 was to food. Just let it die. In the name of all that is holy... let it die.

    iI iDon't iThink iWe iWill.

    FTFY.

  • (cs) in reply to Huh?
    Huh?:
    $letter_array = array( "F", "I", "R", "S", "T", "!"); // F I R S T !

    Come on, it had to be done.

    Nope, it didn't.

    Your post's cleverness percentile is: 0%

  • Eduard Seifert (unregistered) in reply to Joseph
    Joseph:
    Gramma:
    highphilosopher:
    Should have been This:

    $abcdefghijklmnopqrstuvwxyz!_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!");

    You missed a letter.

    You made me waste 2 minutes looking for a ltter that isn't not there.
    This one made my day :-) lol

  • Absoltenstein (unregistered)

    No THIS would really "The Originals":

    function f($v) { return ($v >= a && $v <= 'z'); }
    $letter_array = array_unique(array_filter(str_split(file_get_contents('http://en.wikipedia.org/wiki/The_Originals')), 'f'));
    natsort($letter_array);
    $letter_array += array('!');
    

Leave a comment on “letter_array”

Log In or post as a guest

Replying to comment #:

« Return to Article