Skip to content

Instantly share code, notes, and snippets.

@potato4d
Last active February 22, 2017 05:00
Show Gist options
  • Save potato4d/8a313a1ea7631929193c1bcf1a9d65d6 to your computer and use it in GitHub Desktop.
Save potato4d/8a313a1ea7631929193c1bcf1a9d65d6 to your computer and use it in GitHub Desktop.
RADWIMPSで学ぶ再帰関数 「(前)\1{1,}世」から探し始めよう ref: http://qiita.com/potato4d/items/e3905927670787b34946
<?php
function prev_life($count){
$life = "";
for ($i=0; $i < $count; $i++) {
$life .= "前";
}
return $life;
}
echo "君の" . prev_life(3) . "世から僕は\n";
function recursive(){
return recursive();
}
recursive();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment