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"; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0210.00616.75
8.3.50.0150.01118.41
8.3.40.0100.01019.08
8.3.30.0160.01019.13
8.3.20.0090.00022.45
8.3.10.0050.00522.16
8.3.00.0030.00717.88
8.2.180.0110.01517.38
8.2.170.0170.01019.54
8.2.160.0120.00622.96
8.2.150.0040.00724.18
8.2.140.0070.00324.66
8.2.130.0190.00626.16
8.2.120.0000.01318.30
8.2.110.0090.00319.50
8.2.100.0070.00718.34
8.2.90.0030.00618.13
8.2.80.0070.00317.97
8.2.70.0060.00318.30
8.2.60.0100.00018.59
8.2.50.0070.00318.00
8.2.40.0080.00019.69
8.2.30.0030.00618.57
8.2.20.0070.00718.59
8.2.10.0050.00519.61
8.2.00.0000.00818.54
8.1.280.0180.00725.92
8.1.270.0060.00324.34
8.1.260.0120.00926.35
8.1.250.0060.00328.09
8.1.240.0110.00417.86
8.1.230.0070.00718.14
8.1.220.0090.00018.16
8.1.210.0090.00018.77
8.1.200.0050.00517.73
8.1.190.0000.00917.85
8.1.180.0070.00718.10
8.1.170.0090.00017.97
8.1.160.0000.00819.39
8.1.150.0090.00019.21
8.1.140.0030.00719.25
8.1.130.0090.00320.52
8.1.120.0060.00617.96
8.1.110.0040.00417.96
8.1.100.0040.00417.86
8.1.90.0000.00917.94
8.1.80.0040.00717.80
8.1.70.0060.00317.95
8.1.60.0030.00718.13
8.1.50.0000.01017.98
8.1.40.0080.00318.11
8.1.30.0030.00618.18
8.1.20.0040.00718.16
8.1.10.0030.00618.16
8.1.00.0000.00918.07
8.0.300.0060.00318.96
8.0.290.0060.00317.09
8.0.280.0000.00819.09
8.0.270.0100.00018.90
8.0.260.0000.00719.04
8.0.250.0080.00017.51
8.0.240.0000.00917.45
8.0.230.0090.00017.52
8.0.220.0040.00717.36
8.0.210.0040.00417.39
8.0.200.0000.00817.45
8.0.190.0070.00417.49
8.0.180.0070.00317.39
8.0.170.0070.00317.48
8.0.160.0040.00417.45
8.0.150.0030.00517.40
8.0.140.0000.00917.42
8.0.130.0030.00613.87
8.0.120.0060.00317.46
8.0.110.0090.00017.43
8.0.100.0050.00317.55
8.0.90.0000.00817.29
8.0.80.0080.01117.34
8.0.70.0040.00417.24
8.0.60.0040.00417.29
8.0.50.0040.00417.26
8.0.30.0220.01017.52
8.0.20.0250.01617.82
8.0.10.0030.00717.51
8.0.00.0190.01317.19
7.4.330.0020.00415.55
7.4.320.0040.00417.02
7.4.300.0050.00316.90
7.4.290.0040.00417.08
7.4.280.0060.00317.10
7.4.270.0080.00316.94
7.4.260.0050.00317.04
7.4.250.0040.00417.05
7.4.240.0000.00816.98
7.4.230.0000.00816.82
7.4.220.0030.00717.18
7.4.210.0160.00917.04
7.4.200.0040.00417.14
7.4.160.0240.00816.96
7.4.130.0240.01416.75
7.4.120.0160.01017.00
7.4.110.0190.01016.91
7.4.100.0240.00316.92
7.4.90.0290.00817.06
7.4.80.0100.01719.39
7.4.70.0200.01016.94
7.4.60.0160.00616.76
7.4.50.0040.01117.16
7.4.40.0120.01516.99
7.4.00.0140.00315.30
7.3.330.0070.00013.61
7.3.320.0070.00013.55
7.3.310.0040.00416.75
7.3.300.0000.00816.87
7.3.290.0100.01016.76
7.3.280.0090.01316.71
7.3.260.0190.01216.88
7.3.240.0210.01116.70
7.3.230.0150.00916.77
7.3.210.0140.01417.00
7.3.200.0210.00716.78
7.3.190.0120.01216.67
7.3.180.0170.00716.88
7.3.170.0130.01716.89
7.3.160.0190.00916.77
7.3.10.0490.00315.44
7.3.00.0430.00715.27
7.2.330.0220.01316.87
7.2.320.0120.01517.13
7.2.310.0130.01017.23
7.2.300.0130.01016.91
7.2.290.0100.01416.73
7.2.130.0390.00315.51
7.2.120.0500.01315.32
7.2.110.0480.00615.57
7.2.100.0370.01815.68
7.2.90.0500.00915.62
7.2.80.0520.00315.80
7.2.70.0430.00315.54
7.2.60.0480.00015.66
7.2.50.0500.00315.62
7.2.40.0370.01015.55
7.2.30.0540.01515.56
7.2.20.1490.01015.53
7.2.10.0410.01015.20
7.2.00.0560.00715.46
7.1.250.0460.00014.16

preferences:
49.13 ms | 400 KiB | 5 Q