<?php
error_reporting(-1);
mb_internal_encoding('utf-8');

$phrase =  mb_strtoupper("абвгдеёжзийклмнопрстуфхцчшщъыьэюя");
$fromAngel = 180;
$radius = 11;
$phraseLen = mb_strlen($phrase);
$split = preg_split('//u', $phrase, 0, PREG_SPLIT_NO_EMPTY);

$height = 30;
$centerX = 25;
$centerY = 15;
$factorX = 1.5;

$screen = array_fill(0, $height, array_fill(0, 50, ' '));


$rad = deg2rad(360/$phraseLen);
$a = deg2rad($fromAngel);
for ($q = 0; $q < $phraseLen; $q++){
	$a = $a + $rad;
	$x = $centerX + round($radius * sin($a));
    $y = $centerY + round($radius * cos($a));
    $screen[$y][$x] = $split[$q];
    
}
foreach ($screen as $display){
	echo implode(' ', $display)."\n";
}