<?php

error_reporting(-1);

$phrase = "ABCDEFGHJIKLMNOPQRSTUVWXYZABCDEFGHIJ";
$phraseLength = mb_strlen($phrase);

$fromAngle = -80;
$toAngle = 260;
$radius = 12.5;

$height = 30;
$centerX = 40;
$centerY = 15;

$screen = [];
for($y = 0;$y<$height;$y++){
	$screen[$y] = array_fill(0,80," ");
}
$phraseArray = preg_split('//', $phrase, -1, PREG_SPLIT_NO_EMPTY);;
for($x = 0;$x<$phraseLength;$x++){
	$lk = $radius * cos((((360/$phraseLength)*($x+1))*(M_PI/180)));
	$ko = $radius * sin((((360/$phraseLength)*($x+1))*(M_PI/180)));
	$screen[$centerY-round($lk)][round($ko)*2.7+$centerX] = $phraseArray[$x];
}
for($y = 1;$y<$height;$y++){
	echo "|   ";
	for($x = 1;$x<80;$x++){
		echo $screen[$y][$x];
	}
	echo "\n";
}