3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); mb_internal_encoding('utf-8'); $phrase = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; $phraseLength = mb_strlen($phrase); $letters = preg_split("//u", $phrase); $fromAngle = -80; $toAngle = 260; $radius = 12.5; $height = 30; $centerX = 40; $centerY = 15; $angle = 90; $angleBetweenLetters = 360 / $phraseLength; $screen = array(); for ($y = 0; $y < $phraseLength; $y++){ $screen[$y] = array_fill(0, 100, ' '); } for ($i = 0; $i <= $phraseLength; $i++){ $coordinateYOfLetter = $centerY + round($radius * cos(deg2rad($angle))); $coordinateXOfLetter = 1.8*($centerX + round($radius * sin(deg2rad($angle)))); $screen[$coordinateYOfLetter][$coordinateXOfLetter] = $letters[$i]; $angle -= $angleBetweenLetters; } foreach ($screen as $value) { foreach ($value as $a) { echo $a; } echo "\n"; }
based on 1u3r7
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0rc3
Х Ц Ч Ш Ф Щ Ъ У Ы Т Ь С Э Р Ю П Я О А Н Б М В Л К Г Д Й Е И З Ж Ё