Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sheetsu

 Sheetsu

Symfony Meetup #17 LT 資料
https://symfony.connpass.com/event/63659/

Takashi Kanemoto

August 27, 2017
Tweet

More Decks by Takashi Kanemoto

Other Decks in Programming

Transcript

  1. $base26 = base_convert($number, 10, 26); $from = '0123456789abcdefghijklmnop'; $to =

    '0ABCDEFGHIJKLMNOPQRSTUVWXY'; $name = ''; foreach (str_split($base26) as $digit) { $digit = substr($to, strpos($from, $digit), 1); $name .= $digit; } echo $name . PHP_EOL; ྻ൪߸ˠྻ໊ͷม׵͕ҙ֎ͱ೉͔ͬͨ͠
  2. $number = 3; // -> C $number = 30; //

    -> AD ྻ൪߸ˠྻ໊ͷม׵͕ҙ֎ͱ೉͔ͬͨ͠
  3. $number = 3; // -> C $number = 30; //

    -> AD $number = 26; // -> A0 ͑ͬ ྻ൪߸ˠྻ໊ͷม׵͕ҙ֎ͱ೉͔ͬͨ͠
  4. $number = 3; // -> C $number = 30; //

    -> AD $number = 26; // -> A0 ͑ͬ // Z ʹͳͬͯ΄͔ͬͨ͠ͷʹ… ྻ൪߸ˠྻ໊ͷม׵͕ҙ֎ͱ೉͔ͬͨ͠