PHP Pop Quiz Hotshot

Without running it, what does this do?

function hmmm(){
	$i = 'a';
	$array = array();
	while($i != 'z'){
		$array[$i] = $i;
		$i++;
	}
	return $array;
}


Related posts:

  1. PHP Functions, you’re doing it wrong…
  2. Documenting PHP Code
  3. Getting Started With PHPUnit
  4. RE: Top 10 PHP Techniques That Will Save You Time and Effort
  5. Spartan Coding

Tags: , , , , , , , , , , ,

  • http://zoeandgavin.com zoe

    I know!!!
    It returns an array a = a all the way to y = y!

    :) You shouldn’t exclude z, it’s my favourite letter.

    • http://blog.seanja.com/ SeanJA

      Bah… no one likes z anyway :P

  • http://www.zoeandgavin.com gav

    as it is, it enters an infinite loop :P I think maybe you meant to put an $i++ in there?

    nice new theme btw

    • http://blog.seanja.com/ SeanJA

      Yes… that was mighty silly of me.