3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrase = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; $phraseLength = mb_strlen($phrase); $fromAngle = -80; $toAngle = 260; $radius = 12.5; $height = 30; $centerX = 40; $centerY = 15; $screen = array(); for ($y = 0; $y < $height; $y++) { $screen[$y] = array_fill(0, 80, " "); } $degree = (abs($fromAngle) + $toAngle) / $phraseLength; $curDegree = round($degree); for ($i = 0; $i < $phraseLength; $i++) { $x = round($radius * sin(deg2rad($curDegree)) * 2.1); $y = round($radius * cos(deg2rad($curDegree))); $curDegree += $degree; $screen[$centerY + $y][$centerX + $x] = mb_substr($phrase, $i, 1);; } foreach (array_reverse($screen) as $string) { echo implode("", $string) . "\n"; }
Output for 7.1.25 - 7.1.32, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Я А Б Ю В Э Г Ь Д Ы Е Ъ Ё Щ Ж Ш З Ч И Ц Й Х К Ф Л У М Т Н С Р П О
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Я А Б Ю В Э Г Ь Д Ы Е Ъ Ё Щ Ж Ш З Ч И Ц Й Х К Ф Л У М Т Н С Р П О

preferences:
176.49 ms | 409 KiB | 175 Q