Skip to main content
added 16 characters in body
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
";echo$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed now it to be the (not for long) lowest score for PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
";echo$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed now it to be the lowest score for PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
";echo$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed now it to be the (not for long) lowest score for PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******
added 4 characters in body
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
"?><?=$o;";echo$o;

Try it online!Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed now it to now be the lowest scoredscore for PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
"?><?=$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed it to now be the lowest scored PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
";echo$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed now it to be the lowest score for PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******
-16 bytes, use strings instead of array (duh)
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

PHP, 104104 88 bytes

for(;$i<$argn;$a;$i++<$argn;$a.='**',$i=$i$i++>1?array_unshift($o=$s.$o,$s):1)$o[]=$s=str_pad$o.=$s=str_pad("*$a",$argn,' ',2)?><?=join(."
",$o);?><?=$o;

Try it online!Try it online!

This doesn't beatThis doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed it to now be the lowest scores forscored PHP on this challenge, but it doesn't change the fact that it's just toostill crazy for me to throw away. Enjoy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 bytes

for(;$i<$argn;$a.='**',$i=$i?array_unshift($o,$s):1)$o[]=$s=str_pad("*$a",$argn,' ',2)?><?=join("
",$o);

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away. Enjoy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******

PHP, 104 88 bytes

for(;$i++<$argn;$a.='**',$i++>1?$o=$s.$o:1)$o.=$s=str_pad("*$a",$argn,' ',2)."
"?><?=$o;

Try it online!

This doesn't beat the lowest scores for PHP on this challenge, but it's just too crazy for me to throw away.

Okay, so I've golfed it to now be the lowest scored PHP on this challenge, but it doesn't change the fact that it's still crazy.

$ echo 7|php -nF hour.php
*******
 *****
  ***
   *
  ***
 *****
*******
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57
Loading