#PHP, (削除) 40 (削除ここまで) 34 bytes
PHP, (削除) 40 (削除ここまで) 34 bytes
Along with $argv comes $argc ... and both are variable.
Either one of the arguments or +$argv[0]==+"-" is 0.
while(+$argv[--$argc])$i++;echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, (削除) 35 (削除ここまで) 29 bytes
while(+$argv[--$argc])echo 1;
#PHP, (削除) 40 (削除ここまで) 34 bytes
Along with $argv comes $argc ... and both are variable.
Either one of the arguments or +$argv[0]==+"-" is 0.
while(+$argv[--$argc])$i++;echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, (削除) 35 (削除ここまで) 29 bytes
while(+$argv[--$argc])echo 1;
PHP, (削除) 40 (削除ここまで) 34 bytes
Along with $argv comes $argc ... and both are variable.
Either one of the arguments or +$argv[0]==+"-" is 0.
while(+$argv[--$argc])$i++;echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, (削除) 35 (削除ここまで) 29 bytes
while(+$argv[--$argc])echo 1;
#PHP, 40(削除) 40 (削除ここまで) 34 bytes
AlongsideAlong with $argv comes $argc ... and both are variable.
But I have to avoidEither one of the arguments or $argv[0]+$argv[0]==+"-" is (the script name)0.
forwhile(;+$argv[--$argc&&$argv[$argc];$i++$argc]);echo$i;$i++;echo$i;
takes input from command line arguments. Empty output for 0.
Run
Run with php -nr '<code>' <space separated values>
unary output, 35(削除) 35 (削除ここまで) 29 bytes
forwhile(;+$argv[--$argc&&$argv[$argc];$argc])echo 1;
#PHP, 40 bytes
Alongside with $argv comes $argc ... and both are variable.
But I have to avoid $argv[0] (the script name).
for(;--$argc&&$argv[$argc];$i++);echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, 35 bytes
for(;--$argc&&$argv[$argc];)echo 1;
#PHP, (削除) 40 (削除ここまで) 34 bytes
Along with $argv comes $argc ... and both are variable.
Either one of the arguments or +$argv[0]==+"-" is 0.
while(+$argv[--$argc])$i++;echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, (削除) 35 (削除ここまで) 29 bytes
while(+$argv[--$argc])echo 1;
#PHP, 40 bytes
Alongside with $argv comes $argc ... and both are variable.
But I have to avoid $argv[0] (the script name).
for(;--$argc&&$argv[$argc];$i++);echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, 35 bytes
for(;--$argc&&$argv[$argc];)echo 1;
#PHP, 40 bytes
Alongside with $argv comes $argc ... and both are variable.
But I have to avoid $argv[0] (the script name).
for(;--$argc&&$argv[$argc];$i++);echo$i;
takes input from command line arguments.
Run with php -nr '<code>' <space separated values>
#PHP, 40 bytes
Alongside with $argv comes $argc ... and both are variable.
But I have to avoid $argv[0] (the script name).
for(;--$argc&&$argv[$argc];$i++);echo$i;
takes input from command line arguments. Empty output for 0.
Run with php -nr '<code>' <space separated values>
unary output, 35 bytes
for(;--$argc&&$argv[$argc];)echo 1;