3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); mb_internal_encoding("utf-8"); $phrase = "ПРИВЕТЛИЛИЧКА"; $phraseLenght = 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 = round(360/$phraseLenght); for($i = 0, $curDegree = $degree; $i < $phraseLenght; $i++, $curDegree += $degree){ $x = floor($radius * sin(deg2rad($curDegree))) * 2; $y = floor($radius * cos(deg2rad($curDegree))); if ($x >= 0 and $y >= 0) { $screen[$centerY - $y][$centerX + $x] = mb_substr($phrase, $i, 1); } elseif ($x >= 0 and $y <= 0) { $screen[$centerY + abs($y)][$centerX + $x] = mb_substr($phrase, $i, 1); } elseif ($x <= 0 and $y <= 0) { $screen[$centerY + abs($y)][$centerX - abs($x)] = mb_substr($phrase, $i, 1); } elseif ($x <= 0 and $y >= 0) { $screen[$centerY - $y][$centerX - abs($x)] = mb_substr($phrase, $i, 1); } } foreach ($screen as $row) { foreach ($row as $value) { echo "$value"; } echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
А К П Ч Р И И Л В И Е Л Т

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
59.18 ms | 409 KiB | 8 Q