Skip to main content
added 6 characters in body
Source Link
user85052
user85052

PHP, 84 79 70 63 + 1 bytes+ 63 = 64 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

PHP, 84 79 70 63 + 1 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

PHP, 84 79 70 1 + 63 = 64 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

Aesthetics
Source Link

[PHP]PHP, 84 79 70 63+163 + 1 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

[PHP], 84 79 70 63+1 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

PHP, 84 79 70 63 + 1 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

$argn instead of stdin, 1 more byte golfed
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

PHP[PHP], 84 79 7084 79 70 63+1 bytes

<?for(;$i=fgetc(STDIN);$c+=$i==';';$c=$argn[$i++];$a+=$c==";")if($i=='#'&&print$c^A^R||$a=~-print chr($c%127)$a%127)$c=0;; 

Reads from stdin.

Try it online!


From 84 to 79. I replaced the charcodes with the strings to remove unnecessary ord function. Replaced nested bracesRun as pipe with conditional &&-nR.

From 79 to 71. I removed the initialization of $c. This generates a PHP notice which can be suppressed via the ini (you can also just execute php -d display_error=0. Also switched to short tags. See Code Golf PHP Notices.Try it online!

PHP, 84 79 70 bytes

<?for(;$i=fgetc(STDIN);$c+=$i==';')if($i=='#'&&print chr($c%127))$c=0; 

Reads from stdin.

Try it online!


From 84 to 79. I replaced the charcodes with the strings to remove unnecessary ord function. Replaced nested braces with conditional &&.

From 79 to 71. I removed the initialization of $c. This generates a PHP notice which can be suppressed via the ini (you can also just execute php -d display_error=0. Also switched to short tags. See Code Golf PHP Notices.

[PHP], 84 79 70 63+1 bytes

for(;$c=$argn[$i++];$a+=$c==";")$c^A^R||$a=~-print chr($a%127); 

Run as pipe with -nR

Try it online!

deleted 1 character in body
Source Link
noahnu
  • 111
  • 3
Loading
shortened by suppressing notices
Source Link
noahnu
  • 111
  • 3
Loading
Shortened
Source Link
noahnu
  • 111
  • 3
Loading
Source Link
noahnu
  • 111
  • 3
Loading