Home » Questions » Why doesn't this code simply print letters A to Z? » Comments for "Why doesn't this code simply print letters A to Z?"

Comments for "Why doesn't this code simply print letters A to Z?"

  • Billy
    Wow the output from that is really unexpected.

    NOTE: This comment was originally posted at StackOverflow.com by GWW

  • Joseph
    What is the output?

    NOTE: This comment was originally posted at StackOverflow.com by XSaint32

  • Carolyn
    PHP is not C, even if the syntax tries to convince you of the contrary.

    NOTE: This comment was originally posted at StackOverflow.com by joni

  • Billy
    a-z followed by aa, ab, ac up to yz

    NOTE: This comment was originally posted at StackOverflow.com by GWW

  • Kathy
    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 aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz ea eb ec ed ee ef eg eh ei ej ek el em en eo ep eq er es et eu ev ew ex... on to yz

    NOTE: This comment was originally posted at StackOverflow.com by Surreal Dreams

  • Paula
    @Surreal is that the actual output, or the expected one?

    NOTE: This comment was originally posted at StackOverflow.com by Pekka

  • Pamela
    output: echo "a" to "yz" / that's the actual output

    NOTE: This comment was originally posted at StackOverflow.com by acm

  • Kathy
    This works for me with a very small change: for ($i = 'a'; $i != 'aa'; $i++) { echo "$i\n"; }

    NOTE: This comment was originally posted at StackOverflow.com by Surreal Dreams

  • Carolyn
    really fascinating!

    NOTE: This comment was originally posted at StackOverflow.com by joni

  • Paula
    wtf? I stand corrected. Very interesting behaviour....

    NOTE: This comment was originally posted at StackOverflow.com by Pekka

  • Joseph
    That's pretty cool.

    NOTE: This comment was originally posted at StackOverflow.com by XSaint32

  • Rhonda
    I knew about this along time back, Never needed to use such a thing within an application but hey.

    NOTE: This comment was originally posted at StackOverflow.com by RobertPitt

  • Kelly
    I mean, what the hell?

    NOTE: This comment was originally posted at StackOverflow.com by Jeffrey

  • Debra
    was going to suggest this should go on a new site called wtfphp modeled after wtfjs, but looks like that site already exists, at phpwtf

    NOTE: This comment was originally posted at StackOverflow.com by Ben Lee

  • Theresa
    The comment about that PHP is not C - was the most keenest, example: in c: char c = 'a'; is not the same as in php: $c = 'a';, the point is that in C there is type of char(character 1 symbol), but not in PHP, if U tell PHP $c = 'a'; - means this is a string with just 1 character. That's why U can't loop through 28 characters adequately in PHP. I hope every programmer will learn low-level languages and strong-typing along with it, without forgetting about Math practices, which will help them to be stronger.

    NOTE: This comment was originally posted at StackOverflow.com by zeusakm