fork download
  1. <?php
  2. // original (without the tags and curlys: -6 bytes)
  3. #$a='ABCDEFGHIJKLMNOPQRSTUVWXYZ';$b=65;$c=26;while($c>0)echo str_repeat(chr($b++),26-$c).substr($a,26-$c--).'<br>';
  4. // "\n" instead of '<br>' (-2)
  5. #$a='ABCDEFGHIJKLMNOPQRSTUVWXYZ';$b=65;$c=26;while($c>0)echo str_repeat(chr($b++),26-$c).substr($a,26-$c--)."\n";
  6. // shorter $a (-12)
  7. #$a=join(range(A,Z));$b=65;$c=26;while($c>0)echo str_repeat(chr($b++),26-$c).substr($a,26-$c--)."\n";
  8. // loop $a from 0 to 26 (-11)
  9. #$a=join(range(A,Z));$b=65;while($c<26)echo str_repeat(chr($b++),$c).substr($a,$c++)."\n";
  10. // for instead of while (-1)
  11. #$a=join(range(A,Z));for($b=65;$c<26;)echo str_repeat(chr($b++),$c).substr($a,$c++)."\n";
  12. // golf away $b (-4)
  13. #$a=join(range(A,Z));for(;$c<26;)echo str_repeat(chr($c+65),$c).substr($a,$c++)."\n";
  14. // golf away $a (-6)
  15. #for(;$c<26;)echo str_repeat(chr($c+65),$c).substr(join(range(A,Z)),$c++)."\n";
  16. // golf away substr (-2)
  17. #for(;$c<26;)echo str_repeat(chr($c+65),$c).join(range(chr(65+$c++),Z))."\n";
  18. // str_pad instead of str_repeat (-1)
  19. #for(;$c<26;)echo str_pad(join(range(chr(65+$c),Z)),26,chr(65+$c++),0)."\n";
  20. // bring $b back, golf away $c (-1)
  21. #for($b=64;$b++<90;)echo str_pad(join(range(chr($b),Z)),26,chr($b),0)."\n";
  22. // substitute chr($b) (-2)
  23. #for($b=64;$b++<90;)echo str_pad(join(range($c=chr($b),Z)),26,$c,0)."\n";
  24.  
  25. // a slightly different version for also 72 bytes:
  26. #for($b=64;Z>=$c=chr(++$b);)echo str_pad(join(range($c,Z)),26,$c,0),"\n";
  27.  
  28. // save another 2 bytes with a leading pyhsical linebreak:
  29. #for($b=64;Z>=$c=chr(++$b);)echo"
  30. #",str_pad(join(range($c,Z)),26,$c,0);
  31.  
  32. // loop through characters instead of ordinal values (-8)
  33. for($c=A;$c!=AA;)echo"
  34. ",str_pad(join(range($c,Z)),26,$c++,0);
  35.  
Success #stdin #stdout #stderr 0s 52488KB
stdin
Standard input is empty
stdout
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTUVWXYZ
GGGGGGGHIJKLMNOPQRSTUVWXYZ
HHHHHHHHIJKLMNOPQRSTUVWXYZ
IIIIIIIIIJKLMNOPQRSTUVWXYZ
JJJJJJJJJJKLMNOPQRSTUVWXYZ
KKKKKKKKKKKLMNOPQRSTUVWXYZ
LLLLLLLLLLLLMNOPQRSTUVWXYZ
MMMMMMMMMMMMMNOPQRSTUVWXYZ
NNNNNNNNNNNNNNOPQRSTUVWXYZ
OOOOOOOOOOOOOOOPQRSTUVWXYZ
PPPPPPPPPPPPPPPPQRSTUVWXYZ
QQQQQQQQQQQQQQQQQRSTUVWXYZ
RRRRRRRRRRRRRRRRRRSTUVWXYZ
SSSSSSSSSSSSSSSSSSSTUVWXYZ
TTTTTTTTTTTTTTTTTTTTUVWXYZ
UUUUUUUUUUUUUUUUUUUUUVWXYZ
VVVVVVVVVVVVVVVVVVVVVVWXYZ
WWWWWWWWWWWWWWWWWWWWWWWXYZ
XXXXXXXXXXXXXXXXXXXXXXXXYZ
YYYYYYYYYYYYYYYYYYYYYYYYYZ
ZZZZZZZZZZZZZZZZZZZZZZZZZZ
stderr
PHP Notice:  Use of undefined constant A - assumed 'A' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33
PHP Notice:  Use of undefined constant Z - assumed 'Z' in /home/EgWyGE/prog.php on line 34
PHP Notice:  Use of undefined constant AA - assumed 'AA' in /home/EgWyGE/prog.php on line 33