Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#PHP, (削除) 231 (削除ここまで)(削除) 226 (削除ここまで) 228 bytes

PHP, (削除) 231 (削除ここまで)(削除) 226 (削除ここまで) 228 bytes

for a start

<?preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Save to file, rund php <scriptpath> <text>. Escape newlines in the text to make it work in shell.

#PHP, (削除) 231 (削除ここまで)(削除) 226 (削除ここまで) 228 bytes

for a start

<?preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Save to file, rund php <scriptpath> <text>. Escape newlines in the text to make it work in shell.

PHP, (削除) 231 (削除ここまで)(削除) 226 (削除ここまで) 228 bytes

for a start

<?preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Save to file, rund php <scriptpath> <text>. Escape newlines in the text to make it work in shell.

fixed bug, removed unnecessary regex modifier `i`; added `<?` to remove necessity to escape apostrophes
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, (削除) 231 (削除ここまで) 226(削除) 226 (削除ここまで) 228 bytes

for a start

<?preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Rund withSave to file, rund php -r '<code>'<scriptpath> <text>. Escape newlines in the text to make it work in shell.

#PHP, (削除) 231 (削除ここまで) 226 bytes

for a start

preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Rund with php -r '<code>' <text>. Escape newlines in the text to make it work in shell.

#PHP, (削除) 231 (削除ここまで) (削除) 226 (削除ここまで) 228 bytes

for a start

<?preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Save to file, rund php <scriptpath> <text>. Escape newlines in the text to make it work in shell.

fixed bug, removed unnecessary regex modifier `i`
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, (削除) 231 (削除ここまで) 226 bytes

for a start

preg_match_all("#([\w\*']+)([^\w\*']*)#i"#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>'']["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?'". '":(strpos(".$b",'" '")?'" '":''"");}echo'echo".';";

Rund with php -r '<code>' <text>. Escape newlines in the text to make it work in shell.

#PHP, (削除) 231 (削除ここまで) 226 bytes

for a start

preg_match_all("#([\w\*']+)([^\w\*']*)#i",$argv[1],$m,2);foreach($m as list($a,$b)){$e=strlen(strtr($a,["'"=>'']))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?'. ':(strpos(".$b",' ')?' ':'');}echo'.';

#PHP, (削除) 231 (削除ここまで) 226 bytes

for a start

preg_match_all("#([\w\*']+)([^\w\*']*)#",$argv[1],$m,2);foreach($m as list(,$a,$b)){$e=strlen(strtr($a,["'"=>""]))+$d;if(!$d=strstr($a,'*')?$e%2*10:0)echo chr($e+64),strpos(".$b","
")?". ":(strpos(".$b"," ")?" ":"");}echo".";

Rund with php -r '<code>' <text>. Escape newlines in the text to make it work in shell.

added 9 characters in body
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41
Loading
deleted 2 characters in body
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41
Loading
Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41
Loading

AltStyle によって変換されたページ (->オリジナル) /