3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decode_char2($c) { $a1 = array("0", "1", "2", "3", "4", "5", "6", "7", "9", "H", "M", "D", "X", "V", "J", "Q", "U", "G", "E", "T", "N", "o", "v", "y", "w", "k"); $a2 = array("c", "I", "W", "m", "8", "L", "l", "g", "R", "B", "a", "u", "s", "p", "z", "Z", "e", "d", "=", "x", "Y", "t", "n", "f", "b", "i"); $result = $c; for($j = 0; $j < count($a1); $j++) { if ($c == $a1[$j][0]) { $result = $a2[$j][0]; break; } if ($c == $a2[$j][0]) { $result = $a1[$j][0]; break; } } return $result; } function reverse($s, $direct) { if ($direct == 'd') { $nlen = strlen($s)-3; $r = ''; while ($nlen > 2) { $r .= substr($s,$nlen,1); $nlen--; } $nlen = strlen($r); $nlen2 = intval(substr($s,1,1).substr($s,0,1)); $nlen2 = $nlen2 / 2; if ($nlen2 < $nlen) { $npos = $nlen2; while ($npos < $nlen) { $r = substr($r,0, $npos) . substr($r,$npos + 1); $npos += $nlen2; } } } else { $nlen = strlen($s); $delta = 7; if (($nlen % $delta) == 0) $delta = 8; $s0 = $s; $s7 = substr($s0,0,$delta); $s0 = substr($s0,$delta); $s = ''; while ((strlen($s7) == $delta) && (strlen($s0) > 0)) { $s .= $s7 . 'd'; $s7 = substr($s0,0,$delta); $s0 = substr($s0,$delta); } $s .= $s7; $nlen = strlen($s)-1; $r = ''; while ($nlen >= 0) { $r .= substr($s,$nlen,1); $nlen--; } $delta2 = $delta + $delta; $sdelta2 = "$delta2"; $sdelta4 = substr($sdelta2,1,1) . substr($sdelta2,0,1); $r = $sdelta4 . 'A' . $r . 'rs'; } return($r); } function decode_str2($s) { $s = reverse($s,"d"); $result = ''; for($i = 0; $i < strlen($s); $i++) { $result .= decode_char2($s[$i]); } $result = base64_decode($result); return $result; } function encode_str2($s) { $s = base64_encode($s); $result = ''; for($i = 0; $i < strlen($s); $i++) { $result .= decode_char2($s[$i]); } $result = reverse($result,"e"); return $result; } echo decode_str2("2iob3gRLvctM31EMtgTM25k40Cm=2xmLkasB05wbv1GjttQ3N1AbOxFjkjy5OdE1UjANtjwhkgTakQtWydnbtgGjvc9h0SJ52xWM3NJR3QnL3dJ1GI4h3ayRkxmB6fZMtjAWyCm50iUr");

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.0002.00418.43
8.3.50.0101.99219.70
8.3.40.0131.98918.84
8.3.30.0071.99719.14
8.3.20.0031.99920.29
8.3.10.0032.00023.70
8.3.00.0031.99819.38
8.2.180.0101.99318.29
8.2.170.0101.99222.96
8.2.160.0431.95420.34
8.2.150.0031.99924.18
8.2.140.0002.00424.66
8.2.130.0071.99726.16
8.2.120.0071.99720.97
8.2.110.0071.99620.58
8.2.100.0101.99318.22
8.2.90.0032.00019.22
8.2.80.0002.00317.97
8.2.70.0031.99817.63
8.2.60.0131.98418.03
8.2.50.0001.99618.07
8.2.40.0071.99920.07
8.2.30.0001.99919.56
8.2.20.0071.99417.82
8.2.10.0031.99918.30
8.2.00.0002.00517.80
8.1.270.0071.99523.91
8.1.260.0032.00026.35
8.1.250.0071.99628.09
8.1.240.0002.00222.14
8.1.230.0071.99619.02
8.1.220.0071.99517.74
8.1.210.0071.99418.77
8.1.200.0071.99317.10
8.1.190.0032.00417.23
8.1.180.0002.00118.10
8.1.170.0031.99918.48
8.1.160.0032.00022.09
8.1.150.0002.00618.92
8.1.140.0031.99917.55
8.1.130.0032.00417.92
8.1.120.0032.00017.66
8.1.110.0002.00317.53
8.1.100.0032.00017.48
8.1.90.0002.00317.63
8.1.80.0002.00317.48
8.1.70.0002.00217.46
8.1.60.0002.00217.70
8.1.50.0031.99917.66
8.1.40.0002.00417.62
8.1.30.0002.00217.70
8.1.20.0002.00417.66
8.1.10.0032.00017.49
8.1.00.0002.00117.43
8.0.300.0032.00018.77
8.0.290.0032.00016.75
8.0.280.0101.99718.42
8.0.270.0032.00117.31
8.0.260.0002.00117.26
8.0.250.0002.00216.99
8.0.240.0031.99817.01
8.0.230.0071.99617.02
8.0.220.0002.00116.92
8.0.210.0002.00316.82
8.0.200.0071.99416.89
8.0.190.0032.00016.77
8.0.180.0002.00316.97
8.0.170.0032.00016.87
8.0.160.0002.00416.88
8.0.150.0002.00216.80
8.0.140.0032.00116.76
8.0.130.0071.99413.41
8.0.120.0031.99816.81
8.0.110.0031.99716.86
8.0.100.0002.00116.67
8.0.90.0071.99716.89
8.0.80.0031.99716.86
8.0.70.0031.99716.70
8.0.60.0101.98916.88
8.0.50.0101.99216.89
8.0.30.0161.98617.18
8.0.20.0081.99417.40
8.0.10.0031.99816.97
8.0.00.0201.97916.91
7.4.330.0002.00215.00
7.4.320.0032.00016.32
7.4.300.0071.99416.28
7.4.290.0002.00216.43
7.4.280.0031.99816.51
7.4.270.0071.99516.54
7.4.260.0071.99516.55
7.4.250.0002.00216.39
7.4.240.0002.00316.46
7.4.230.0031.99816.34
7.4.220.0291.96316.54
7.4.210.0161.98416.45
7.4.200.0031.99916.52
7.4.160.0271.98016.48
7.4.150.0251.90217.40
7.4.140.0131.99617.86
7.4.130.0141.98316.54
7.4.120.0191.98516.35
7.4.110.0132.44416.39
7.4.100.0132.44416.32
7.4.90.0072.43816.43
7.4.80.0102.44319.39
7.4.70.0102.45216.49
7.4.60.0262.30916.46
7.4.50.0032.49616.49
7.4.40.0132.44416.45
7.4.30.0102.43316.53
7.4.00.0032.48714.72
7.3.330.0002.00113.20
7.3.320.0031.99913.23
7.3.310.0031.99916.34
7.3.300.0032.00116.21
7.3.290.0101.99316.27
7.3.280.0151.98516.34
7.3.270.0071.99217.40
7.3.260.0201.99116.36
7.3.250.0081.99616.35
7.3.240.0261.97316.42
7.3.230.0132.46816.39
7.3.210.0132.34816.34
7.3.200.0162.46219.39
7.3.190.0062.46916.39
7.3.180.0162.40016.17
7.3.170.0102.43516.49
7.3.160.0072.46116.48
7.2.330.0252.31416.79
7.2.320.0072.45616.63
7.2.310.0262.44216.73
7.2.300.0192.42216.85
7.2.290.0062.47316.82
7.2.00.0002.50119.14
7.1.100.0002.50118.25
7.1.70.0002.50116.90
7.1.60.0102.49119.46
7.1.50.0172.48534.88
7.1.00.0072.49322.32
7.0.200.1372.36016.77
7.0.140.0032.49722.00
7.0.60.0072.49320.07
7.0.50.0072.49317.95
7.0.40.0002.50019.96
7.0.30.0232.47719.73
7.0.20.0272.47319.80
7.0.10.0032.49719.94
7.0.00.0072.49319.81
5.6.280.0132.48720.92
5.6.210.0102.49020.72
5.6.200.0032.49718.23
5.6.190.0032.49720.24
5.6.180.0432.45720.39
5.6.170.0272.47320.47
5.6.160.0072.49320.38
5.6.150.0072.49318.20
5.6.140.0032.49718.21
5.6.130.0072.49318.14
5.6.120.0172.48321.00
5.6.110.0072.49320.92
5.6.100.0032.49721.06
5.6.90.0132.48721.13
5.6.80.0172.48320.41
5.5.350.0002.50020.46
5.5.340.0102.49018.10
5.5.330.0132.48720.26
5.5.320.0272.47320.24
5.5.310.0302.47020.25
5.5.300.0032.49718.02
5.5.290.0032.49718.09
5.5.280.0032.49720.80
5.5.270.0032.49720.82
5.5.260.0002.50020.82
5.5.250.0032.49720.74
5.5.240.3902.11020.10
5.4.450.0232.47319.52
5.4.440.0172.48019.37
5.4.430.0132.48319.35
5.4.420.0232.47319.13
5.4.410.0202.47719.38
5.4.400.0232.47318.85
5.4.390.0672.29018.52
5.4.380.0552.41718.50
5.4.370.0552.43018.60
5.4.360.0522.43318.50
5.4.350.0572.29818.66
5.4.340.0422.32818.78
5.4.320.0442.17015.57
5.4.310.0282.22115.64
5.4.300.0322.18615.65
5.4.290.0372.20915.63
5.4.280.0382.20915.55
5.4.270.0432.18415.57
5.4.260.0372.21215.50
5.4.250.0342.20215.56
5.4.240.0312.21915.57
5.4.230.0392.20715.51
5.4.220.0392.20715.58
5.4.210.0322.21015.51
5.4.200.0332.21614.61
5.4.190.0382.20015.46
5.4.180.0462.18715.49
5.4.170.0452.18715.61
5.4.160.0412.20415.49
5.4.150.0302.20915.58
5.4.140.0412.17314.27
5.4.130.0342.21514.19
5.4.120.0342.21414.25
5.4.110.0392.18714.16
5.4.100.0471.99314.18
5.4.90.0191.85714.12
5.4.80.0341.76814.17
5.4.70.0321.81214.16
5.4.60.0321.73614.16
5.4.50.0251.86214.17
5.4.40.0201.92214.16
5.4.30.0201.92814.13
5.4.20.0261.82514.14
5.4.10.0231.82214.11
5.4.00.0231.91113.63

preferences:
40.27 ms | 400 KiB | 5 Q