3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "Фадэь ёэ хфигцаёачр гэытиочр, ыа гэытиочр, ыа тэоищэцюэточщи таюэж ёхфтх, щеяамещал ъбыэж хф зъшюх, хф ичыаъэттес фаяишъяищ зиошыацочща? "; function rotn($string, $n) { $alphabet = array( 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 => "я" ); $alphabet_r = array_flip($alphabet); $string = strtolower($string); foreach (str_split(strtolower($string), 1) as $character) { //echo $character; echo $alphabet[$alphabet_r[$character] + $n]; } } rotn($string, 1);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0120.00017.13
7.2.00.0040.01119.50
7.1.200.0050.00315.70
7.1.100.0030.01218.16
7.1.70.0030.00617.21
7.1.60.0230.00319.33
7.1.50.0100.00316.64
7.1.00.0100.07022.40
7.0.200.0070.00416.71
7.0.140.0100.07022.22
7.0.100.0200.03319.93
7.0.90.0070.04319.92
7.0.80.0070.04019.91
7.0.70.0130.03320.00
7.0.60.0200.09019.79
7.0.50.0230.06320.32
7.0.40.0070.04320.05
7.0.30.0070.08320.12
7.0.20.0030.08320.14
7.0.10.0130.07320.08
7.0.00.0100.04720.10
5.6.280.0070.07320.96
5.6.250.0130.03320.66
5.6.240.0030.04320.79
5.6.230.0030.04320.66
5.6.220.0100.03320.67
5.6.210.0070.07320.69
5.6.200.0070.04021.09
5.6.190.0000.08721.09
5.6.180.0030.05021.10
5.6.170.0100.05321.05
5.6.160.0070.05721.11
5.6.150.0100.08021.21
5.6.140.0070.06021.00
5.6.130.0070.08720.98
5.6.120.0130.07320.97
5.6.110.0100.08021.13
5.6.100.0070.04321.00
5.6.90.0100.07720.98
5.6.80.0070.07320.33
5.6.70.0070.06020.53
5.6.60.0100.07720.43
5.6.50.0070.08320.48
5.6.40.0030.05020.47
5.6.30.0100.05020.57
5.6.20.0130.06320.44
5.6.10.0100.04720.47
5.6.00.0070.07320.41
5.5.380.0030.04020.43
5.5.370.0030.04020.35
5.5.360.0000.05020.43
5.5.350.0070.04020.50
5.5.340.0100.03320.67
5.5.330.0070.06320.84
5.5.320.0170.07020.90
5.5.310.0130.04320.80
5.5.300.0130.06320.77
5.5.290.0030.08720.96
5.5.280.0100.08320.86
5.5.270.0070.09020.76
5.5.260.0070.04720.85
5.5.250.0130.07720.68
5.5.240.0030.08020.31
5.5.230.0070.03720.14
5.5.220.0130.08020.21
5.5.210.0130.07720.28
5.5.200.0070.08020.22
5.5.190.0070.08020.29
5.5.180.0070.06320.26
5.5.160.0070.07720.22
5.5.150.0170.04720.14
5.5.140.0030.08020.30
5.5.130.0100.03720.10
5.5.120.0070.08020.11
5.5.110.0130.04720.29
5.5.100.0070.08720.15
5.5.90.0130.03720.10
5.5.80.0030.07320.13
5.5.70.0100.07320.04
5.5.60.0130.07320.12
5.5.50.0130.07720.18
5.5.40.0130.05020.11
5.5.30.0100.07320.07
5.5.20.0270.05020.17
5.5.10.0130.07320.00
5.5.00.0070.08020.07
5.4.450.0070.08019.36
5.4.440.0030.06019.45
5.4.430.0100.08319.41
5.4.420.0030.08319.44
5.4.410.0130.07019.10
5.4.400.0100.06019.09
5.4.390.0030.08319.10
5.4.380.0000.07719.03
5.4.370.0100.04019.16
5.4.360.0000.07719.16
5.4.350.0100.07319.04
5.4.340.0030.08019.16
5.4.320.0130.07019.14
5.4.310.0100.07018.90
5.4.300.0070.04319.20
5.4.290.0070.07718.86
5.4.280.0070.08319.23
5.4.270.0030.07319.14
5.4.260.0070.04018.88
5.4.250.0070.07719.12
5.4.240.0100.07319.12
5.4.230.0100.06719.02
5.4.220.0200.06319.09
5.4.210.0070.06319.20
5.4.200.0100.07019.16
5.4.190.0170.05319.08
5.4.180.0170.04719.22
5.4.170.0030.07318.86
5.4.160.0070.08019.10
5.4.150.0070.08318.83
5.4.140.0100.04016.47
5.4.130.0100.06716.41
5.4.120.0030.07716.50
5.4.110.0070.05716.45
5.4.100.0100.07316.52
5.4.90.0100.04016.52
5.4.80.0070.05716.32
5.4.70.0030.07316.43
5.4.60.0130.06316.54
5.4.50.0100.07016.42
5.4.40.0100.05716.50
5.4.30.0100.07016.36
5.4.20.0030.04316.38
5.4.10.0030.04316.46
5.4.00.0100.02715.95
5.3.290.0100.08014.82
5.3.280.0030.04714.73
5.3.270.0030.08014.78
5.3.260.0070.08314.62
5.3.250.0200.06714.62
5.3.240.0070.07314.76
5.3.230.0170.07014.61
5.3.220.0100.07014.65
5.3.210.0000.07014.62
5.3.200.0030.06714.64
5.3.190.0070.07714.62
5.3.180.0100.06714.70
5.3.170.0100.07014.71
5.3.160.0170.06314.64
5.3.150.0070.08014.59
5.3.140.0000.08014.57
5.3.130.0070.07014.52
5.3.120.0070.08014.61
5.3.110.0070.05314.65
5.3.100.0100.07014.12
5.3.90.0030.06014.03
5.3.80.0070.06714.13
5.3.70.0000.07313.97
5.3.60.0100.04014.05
5.3.50.0130.07314.09
5.3.40.0070.07313.92
5.3.30.0200.05714.07
5.3.20.0070.07313.72
5.3.10.0030.04313.77
5.3.00.0100.06713.64
5.2.170.0030.05011.08
5.2.160.0030.06311.11
5.2.150.0070.07011.10
5.2.140.0000.07011.25
5.2.130.0130.05711.04
5.2.120.0100.06711.20
5.2.110.0100.05011.20
5.2.100.0070.03711.23
5.2.90.0030.05311.08
5.2.80.0030.03711.25
5.2.70.0030.06711.16
5.2.60.0030.06011.19
5.2.50.0100.03710.98
5.2.40.0100.05710.90
5.2.30.0100.05311.04
5.2.20.0100.05311.14
5.2.10.0130.05010.91
5.2.00.0070.04310.79
5.1.60.0030.0579.90
5.1.50.0070.05010.16
5.1.40.0100.04710.08
5.1.30.0070.02710.48
5.1.20.0070.05710.41
5.1.10.0000.06010.12
5.1.00.0030.04010.11
5.0.50.0030.0439.54
5.0.40.0030.0439.54
5.0.30.0070.0539.54
5.0.20.0030.0209.54
5.0.10.0000.0439.54
5.0.00.0030.0679.54
4.4.90.0070.0309.54
4.4.80.0000.0279.54
4.4.70.0030.0379.54
4.4.60.0030.0339.54
4.4.50.0000.0409.54
4.4.40.0030.0409.54
4.4.30.0030.0379.54
4.4.20.0030.0339.54
4.4.10.0100.0239.54
4.4.00.0030.0339.54
4.3.110.0070.0339.54
4.3.100.0000.0309.54
4.3.90.0070.0179.54
4.3.80.0030.0409.54
4.3.70.0000.0339.54
4.3.60.0000.0339.54
4.3.50.0000.0309.54
4.3.40.0070.0439.54
4.3.30.0030.0379.54
4.3.20.0000.0379.54
4.3.10.0030.0339.54
4.3.00.0030.0279.54