3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decode(string $phrase): string { $dictionary = [ 1 => 'а', 2 => 'е', 3 => 'ё', 4 => 'и', 5 => 'й', 6 => 'о', 7 => 'у', 8 => 'э', 9 => 'ю', 10 => 'я', 11 => 'б', 12 => 'в', 13 => 'г', 14 => 'д', 15 => 'ж', 16 => 'з', 17 => 'к', 18 => 'л', 19 => 'м', 20 => 'н', 21 => 'п', 22 => 'р', 23 => 'с', 24 => 'т', 25 => 'ф', 26 => 'х', 27 => 'ц', 28 => 'ч', 29 => 'ш', 30 => 'щ', 31 => 'ь', 32 => 'ы', 33 => 'ъ', ]; $words = explode(' ', $phrase); $result = ''; foreach ($words as $word) { $letters = explode('.', $word); $result .= ' ' . implode('', array_map(function ($value) use ($dictionary) { $index = (int) $value; if ($index < 1 || $index > 33) { return $value; } return $dictionary[(int)$value]; }, $letters)); } return $result; } echo decode('6.19.4 6.23.7.15.14.1.9.24 19.2.20.10 21.22.2.15.12.3 , 28.2.19 7.16.20.1.9.24.');

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.0110.00718.25
8.3.50.0090.00618.16
8.3.40.0140.00718.79
8.3.30.0110.00418.80
8.3.20.0000.00720.01
8.3.10.0040.00421.57
8.3.00.0050.00319.38
8.2.180.0060.01618.54
8.2.170.0040.01122.96
8.2.160.0140.00320.52
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00422.05
8.2.120.0080.00026.35
8.2.110.0000.01020.89
8.2.100.0090.00317.86
8.2.90.0080.00019.26
8.2.80.0080.00017.97
8.2.70.0000.01018.04
8.2.60.0030.00518.04
8.2.50.0050.00518.22
8.2.40.0040.00420.60
8.2.30.0050.00319.22
8.2.20.0040.00718.08
8.2.10.0070.00018.20
8.2.00.0040.00418.23
8.1.280.0170.00025.92
8.1.270.0040.00420.19
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0050.00521.27
8.1.230.0120.00017.77
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0090.00017.35
8.1.190.0090.00017.25
8.1.180.0030.00518.10
8.1.170.0000.00818.57
8.1.160.0000.00818.96
8.1.150.0040.00418.95
8.1.140.0050.00217.76
8.1.130.0040.00417.45
8.1.120.0050.00317.37
8.1.110.0090.00017.41
8.1.100.0000.00917.44
8.1.90.0030.00517.49
8.1.80.0040.00417.42
8.1.70.0000.00717.38
8.1.60.0040.00417.50
8.1.50.0000.00817.51
8.1.40.0030.00517.56
8.1.30.0050.00317.64
8.1.20.0030.00517.66
8.1.10.0040.00417.61
8.1.00.0040.00417.45
8.0.300.0070.00018.77
8.0.290.0040.00416.61
8.0.280.0030.00318.48
8.0.270.0050.00317.18
8.0.260.0000.00716.74
8.0.250.0030.00316.96
8.0.240.0030.00717.00
8.0.230.0000.00716.97
8.0.220.0070.00316.92
8.0.210.0050.00316.92
8.0.200.0080.00016.96
8.0.190.0060.00316.96
8.0.180.0000.00816.95
8.0.170.0000.00816.89
8.0.160.0000.00816.98
8.0.150.0000.00716.73
8.0.140.0000.00716.91
8.0.130.0000.00613.34
8.0.120.0030.00616.82
8.0.110.0040.00416.81
8.0.100.0050.00216.93
8.0.90.0040.00417.01
8.0.80.0130.00316.94
8.0.70.0000.00716.89
8.0.60.0000.00716.95
8.0.50.0040.00416.93
8.0.30.0120.01117.19
8.0.20.0150.00617.40
8.0.10.0040.00417.06
8.0.00.0100.00716.74
7.4.330.0050.00015.55
7.4.320.0030.00316.50
7.4.300.0060.00016.43
7.4.290.0030.00516.52
7.4.280.0080.00016.59
7.4.270.0030.00316.53
7.4.260.0070.00016.48
7.4.250.0000.00716.45
7.4.240.0050.00516.56
7.4.230.0000.00716.46
7.4.220.0000.00716.49
7.4.210.0150.00016.39
7.4.200.0050.00216.63
7.4.160.0090.00716.62
7.4.150.0060.01217.40
7.4.140.0070.01317.86
7.4.130.0090.00916.67
7.4.120.0090.00916.49
7.4.110.0140.00316.72
7.4.100.0070.01016.39
7.4.90.0000.02016.46
7.4.80.0120.00619.39
7.4.70.0110.00816.42
7.4.60.0120.00616.33
7.4.50.0030.01216.39
7.4.40.0120.00916.56
7.4.00.0000.01614.89
7.3.330.0060.00013.09
7.3.320.0000.00613.16
7.3.310.0070.00016.21
7.3.300.0000.00716.31
7.3.290.0100.00616.30
7.3.280.0060.01516.34
7.3.270.0120.00417.40
7.3.260.0080.01316.52
7.3.250.0090.01016.35
7.3.240.0110.01116.40
7.3.230.0000.01816.44
7.3.210.0070.01116.42
7.3.200.0060.01016.59
7.3.190.0070.01016.37
7.3.180.0190.00316.31
7.3.170.0090.00916.70
7.3.160.0030.01316.37
7.2.330.0090.00916.82
7.2.320.0060.02216.75
7.2.310.0100.00716.60
7.2.300.0090.00916.79
7.2.290.0110.00716.73
7.2.60.0090.00617.03
7.2.50.0080.00317.05
7.2.10.0520.01317.76
7.2.00.0310.01618.01
7.1.200.0040.01115.78
7.1.130.0210.01016.83
7.1.120.0430.00716.73
7.1.110.0250.00816.42
7.1.100.0230.01716.13
7.1.90.0470.00816.06
7.1.80.0430.01016.38
7.1.70.0420.01115.17
7.1.60.0550.01133.19
7.1.50.0360.01932.99
7.1.40.0520.01532.59
7.1.30.0310.02132.72
7.1.20.0210.01232.69
7.1.10.0310.01014.65
7.1.00.0280.00614.98

preferences:
39.01 ms | 400 KiB | 5 Q