LoginSignup
7
6

More than 5 years have passed since last update.

ズンドコキヨシ with PHP

Last updated at Posted at 2016-03-12

空前のズンドコキヨシブーム

ズンドコキヨシまとめ

n番煎じっぽいけど、PHPでも書いてみた

<?php
mb_language('Japanese');
mb_internal_encoding('UTF-8');

class Zundoko {

    const ZUNDOCO_PHRASE = 'ズンズンズンズンドコ';

    public function kiyoshi(){
        $zundokoList = ["ズン", "ドコ"];
        $cache = "";
        do {
            $choice = $zundokoList[mt_rand(0, 1)];
            echo $choice;

            $cache .= $choice;
            $generated = mb_substr($cache, mb_strlen(self::ZUNDOCO_PHRASE) * -1);
        } while (strcmp(self::ZUNDOCO_PHRASE,$generated));
        echo "キ・ヨ・シ!";
    }

}

$zun = new Zundoko();
$zun->kiyoshi();

実行結果

f6b706e432b6c6342c4cc6b690128aa3.png

余談

2016/03/18
ラブ注入した

7
6
3

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