7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHPでもがんばるぞい

Posted at

完全にインスパイアされた: Ruby - 今日も1日がんばるぞい! - Qiita

<?
$dic = [["今日","ぞい"],["も"],["1","ぞい"],["日","ぞい"],["がん","ぞい"],["ばる","ぞい"],["ぞい!"]];
$i=0;
do{
  $res='';
  foreach($dic as $v)
  {
    $res.=$v[array_rand($v)];
  }
  $i++;
  echo $res.PHP_EOL;
} while($res!=="今日も1日がんばるぞい!");
echo "? がんばるまで {$i} zoiでした?";

result
$ php zoi.php
ぞいも1ぞいぞいばるぞい!
ぞいも1日がんばるぞい!
今日もぞいぞいぞいばるぞい!
ぞいも1ぞいぞいばるぞい!
ぞいも1ぞいがんぞいぞい!
今日もぞいぞいぞいぞいぞい!
今日も1ぞいがんばるぞい!
ぞいも1日がんばるぞい!
ぞいもぞいぞいぞいばるぞい!
ぞいもぞいぞいぞいばるぞい!
ぞいもぞい日ぞいぞいぞい!
ぞいもぞい日ぞいぞいぞい!
ぞいもぞいぞいぞいばるぞい!
今日も1日ぞいぞいぞい!
ぞいも1ぞいぞいばるぞい!
今日もぞい日ぞいぞいぞい!
今日もぞい日ぞいばるぞい!
ぞいもぞい日ぞいばるぞい!
ぞいも1日がんぞいぞい!
今日もぞいぞいぞいばるぞい!
ぞいも1日ぞいぞいぞい!
今日もぞいぞいがんぞいぞい!
ぞいも1ぞいがんばるぞい!
ぞいもぞいぞいぞいぞいぞい!
ぞいもぞい日がんぞいぞい!
今日も1日がんばるぞい!
? がんばるまで 26 zoiでした?

ごめんなさい丸パクリでした。

##がんばる!

7
6
13

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?