Timeline for X Steps Forward, 1 Step Back
Current License: CC BY-SA 4.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| May 31, 2018 at 22:58 | comment | added | Sam Dean | @Wernisch thanks for your formula! | |
| May 31, 2018 at 22:55 | history | edited | Sam Dean | CC BY-SA 4.0 |
new method thanks to @Wernisch and formatting
|
| May 31, 2018 at 22:31 | history | edited | Sam Dean | CC BY-SA 4.0 |
second method doesn't work for n=0
|
| May 31, 2018 at 15:35 | history | edited | Sam Dean | CC BY-SA 4.0 |
new method
|
| May 31, 2018 at 13:14 | history | edited | Sam Dean | CC BY-SA 4.0 |
added 118 characters in body
|
| May 31, 2018 at 11:14 | history | edited | Sam Dean | CC BY-SA 4.0 |
bitwise or
|
| May 31, 2018 at 10:14 | comment | added | Sam Dean | @KevinCruijssen I kept posting the wrong TIO! TIO says 58 now but I've posted 55 as you can remove "php" from the opening tag, just not in TIO | |
| May 31, 2018 at 10:09 | history | edited | Sam Dean | CC BY-SA 4.0 |
improved loop
|
| May 31, 2018 at 10:07 | comment | added | Kevin Cruijssen | You're welcome. Btw, your TIO is currently still 60 bytes instead of 58. And not sure why you've stated 57. Try it online. | |
| May 31, 2018 at 10:07 | history | edited | Sam Dean | CC BY-SA 4.0 |
can't format <?php
|
| May 31, 2018 at 10:03 | comment | added | Sam Dean | @KevinCruijssen thanks very much! | |
| May 31, 2018 at 10:02 | history | edited | Sam Dean | CC BY-SA 4.0 |
short open tag
|
| May 31, 2018 at 9:48 | comment | added | Kevin Cruijssen |
Hi, welcome to PPCG! If you haven't yet, tips for golfing in PHP and tips for golfing in <all languages> might be interesting to read through. Some things to golf: you can remove the trailing ?>. Removing $x=0 and $i=0 is indeed allowed (if not, $x=$i=0 would have been shorter as well). Also, the loop can be shortened to for(;$i<$y+1;)$x+=$i++;. Which is -15 bytes in total. Enjoy your stay! :)
|
|
| May 31, 2018 at 9:39 | history | edited | Sam Dean | CC BY-SA 4.0 |
reduced code
|
| May 31, 2018 at 9:18 | history | answered | Sam Dean | CC BY-SA 4.0 |