3v4l.org

run code in 300+ PHP versions simultaneously
<?php class xxtea { function __construct(){ } function __destruct(){ } public function encrypt($s,$key = "!@#^~ku6&%(com)T"){ return str_replace(array('+','/','='), array('-','_','.'), base64_encode($this->xxtea_encrypt($s, $key))); } public function decrypt($e,$key = "!@#^~ku6&%(com)T"){ $c = str_replace(array('-','_','.'), array('+','/','='), $e); return $this->xxtea_decrypt(base64_decode($c), $key); } private function long2str($v, $w) { $len = count($v); $n = ($len - 1) << 2; if ($w) { $m = $v[$len - 1]; if (($m < $n - 3) || ($m > $n)) return false; $n = $m; } $s = array(); for ($i = 0; $i < $len; $i++) { $s[$i] = pack("V", $v[$i]); } if ($w) { return substr(join('', $s), 0, $n); } else { return join('', $s); } } private function str2long($s, $w) { $v = unpack("V*", $s. str_repeat("\0", (4 - strlen($s) % 4) & 3)); $v = array_values($v); if ($w) { $v[count($v)] = strlen($s); } return $v; } private function int32($n) { while ($n >= 2147483648) $n -= 4294967296; while ($n <= -2147483649) $n += 4294967296; return (int)$n; } private function xxtea_encrypt($str, $key) { if ($str == "") { return ""; } $v = $this->str2long($str, true); $k = $this->str2long($key, false); if (count($k) < 4) { for ($i = count($k); $i < 4; $i++) { $k[$i] = 0; } } $n = count($v) - 1; $z = $v[$n]; $y = $v[0]; $delta = 0x9E3779B9; $q = floor(6 + 52 / ($n + 1)); $sum = 0; while (0 < $q--) { $sum = $this->int32($sum + $delta); $e = $sum >> 2 & 3; for ($p = 0; $p < $n; $p++) { $y = $v[$p + 1]; $mx = $this->int32((($z >> 5 & 0x07ffffff) ^ $y << 2) + (($y >> 3 & 0x1fffffff) ^ $z << 4)) ^ $this->int32(($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z)); $z = $v[$p] = $this->int32($v[$p] + $mx); } $y = $v[0]; $mx = $this->int32((($z >> 5 & 0x07ffffff) ^ $y << 2) + (($y >> 3 & 0x1fffffff) ^ $z << 4)) ^ $this->int32(($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z)); $z = $v[$n] = $this->int32($v[$n] + $mx); } return $this->long2str($v, false); } private function xxtea_decrypt($str, $key) { if ($str == "") { return ""; } $v = $this->str2long($str, false); $k = $this->str2long($key, false); if (count($k) < 4) { for ($i = count($k); $i < 4; $i++) { $k[$i] = 0; } } $n = count($v) - 1; $z = $v[$n]; $y = $v[0]; $delta = 0x9E3779B9; $q = floor(6 + 52 / ($n + 1)); $sum = $this->int32($q * $delta); while ($sum != 0) { $e = $sum >> 2 & 3; for ($p = $n; $p > 0; $p--) { $z = $v[$p - 1]; $mx = $this->int32((($z >> 5 & 0x07ffffff) ^ $y << 2) + (($y >> 3 & 0x1fffffff) ^ $z << 4)) ^ $this->int32(($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z)); $y = $v[$p] = $this->int32($v[$p] - $mx); } $z = $v[$n]; $mx = $this->int32((($z >> 5 & 0x07ffffff) ^ $y << 2) + (($y >> 3 & 0x1fffffff) ^ $z << 4)) ^ $this->int32(($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z)); $y = $v[0] = $this->int32($v[0] - $mx); $sum = $this->int32($sum - $delta); } return $this->long2str($v, true); } } $xxtea = new xxtea(); $vid = $xxtea->decrypt('ACIWYqQSSq4W0axA', 'phpvms.com%(!phpvms.com%(!13!$5@)'); var_dump($vid);

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.0120.00618.26
8.3.50.0100.01021.14
8.3.40.0110.00718.86
8.3.30.0040.01118.78
8.3.20.0080.00018.71
8.3.10.0060.00321.18
8.3.00.0060.00321.98
8.2.180.0090.01216.63
8.2.170.0090.01222.96
8.2.160.0040.01120.39
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00021.10
8.2.110.0040.00720.55
8.2.100.0080.00317.91
8.2.90.0040.00419.35
8.2.80.0040.00417.97
8.2.70.0150.00617.25
8.2.60.0040.00718.16
8.2.50.0030.00718.07
8.2.40.0080.00018.47
8.2.30.0000.00919.56
8.2.20.0000.00817.91
8.2.10.0080.00017.78
8.2.00.0090.00317.75
8.1.280.0150.00925.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00522.64
8.1.230.0090.00321.12
8.1.220.0080.00018.77
8.1.210.0050.00319.15
8.1.200.0000.00917.60
8.1.190.0000.00817.65
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0040.00419.00
8.1.150.0000.00918.70
8.1.140.0000.00717.62
8.1.130.0070.00017.87
8.1.120.0040.00417.59
8.1.110.0000.00817.59
8.1.100.0040.00417.56
8.1.90.0000.00717.64
8.1.80.0040.00417.54
8.1.70.0000.00817.56
8.1.60.0030.00517.71
8.1.50.0050.00317.55
8.1.40.0000.00817.65
8.1.30.0040.00417.66
8.1.20.0050.00317.71
8.1.10.0040.00417.77
8.1.00.0030.00617.65
8.0.300.0060.00320.18
8.0.290.0060.00617.40
8.0.280.0070.00018.49
8.0.270.0030.00317.39
8.0.260.0050.00318.45
8.0.250.0040.00416.94
8.0.240.0030.00517.05
8.0.230.0040.00417.11
8.0.220.0050.00216.91
8.0.210.0000.00716.88
8.0.200.0030.00317.01
8.0.190.0050.00316.99
8.0.180.0040.00416.98
8.0.170.0000.00816.93
8.0.160.0040.00417.04
8.0.150.0070.00016.93
8.0.140.0040.00416.90
8.0.130.0000.00613.41
8.0.120.0040.00416.99
8.0.110.0080.00017.06
8.0.100.0050.00216.89
8.0.90.0000.00717.07
8.0.80.0000.01517.06
8.0.70.0030.00517.02
8.0.60.0030.00516.82
8.0.50.0050.00217.05
8.0.30.0130.01017.21
8.0.20.0180.00817.43
8.0.10.0000.00817.18
8.0.00.0030.01616.86
7.4.330.0030.00316.77
7.4.320.0030.00516.63
7.4.300.0000.00716.73
7.4.290.0030.00316.70
7.4.280.0040.00416.65
7.4.270.0000.00816.70
7.4.260.0000.00513.41
7.4.250.0030.00516.49
7.4.240.0040.00316.66
7.4.230.0040.00416.66
7.4.220.0040.01516.61
7.4.210.0080.00916.69
7.4.200.0040.00416.43
7.4.190.0040.00416.80
7.4.160.0120.01216.72
7.4.150.0030.01317.40
7.4.140.0060.01217.86
7.4.130.0110.01016.69
7.4.120.0110.00816.70
7.4.110.0070.01016.58
7.4.100.0090.00916.78
7.4.90.0110.01016.63
7.4.80.0100.00719.39
7.4.70.0070.01016.50
7.4.60.0100.01016.59
7.4.50.0090.00016.66
7.4.40.0070.01022.77
7.4.30.0120.00916.74
7.4.00.0060.00914.94
7.3.330.0050.00013.31
7.3.320.0000.00613.52
7.3.310.0080.00016.45
7.3.300.0000.00716.43
7.3.290.0040.01216.54
7.3.280.0080.00716.45
7.3.270.0070.01117.40
7.3.260.0100.01218.24
7.3.250.0110.00816.58
7.3.240.0030.01416.78
7.3.230.0100.00616.57
7.3.210.0070.01116.46
7.3.200.0100.00719.39
7.3.190.0150.00316.43
7.3.180.0060.01016.50
7.3.170.0090.01216.64
7.3.160.0030.01316.68
7.3.120.0060.01014.88
7.3.110.0000.01814.93
7.3.100.0060.00914.77
7.3.90.0000.01414.87
7.3.80.0000.00914.74
7.3.70.0030.01215.04
7.3.60.0040.00814.91
7.3.50.0000.01315.01
7.3.40.0000.00915.09
7.3.30.0060.00615.02
7.3.20.0030.01016.67
7.3.10.0090.00916.34
7.3.00.0060.00316.62
7.2.330.0120.00616.85
7.2.320.0040.01516.67
7.2.310.0120.00616.65
7.2.300.0140.00316.84
7.2.290.0120.00616.64
7.2.250.0120.00615.11
7.2.240.0060.01315.25
7.2.230.0000.01615.27
7.2.220.0040.01115.04
7.2.210.0090.00014.93
7.2.200.0060.00915.09
7.2.190.0030.01015.34
7.2.180.0100.00315.27
7.2.170.0000.01015.23
7.2.160.0060.00915.27
7.2.150.0060.00617.06
7.2.140.0030.01017.00
7.2.130.0000.01117.04
7.2.120.0070.00716.67
7.2.110.0120.00316.70
7.2.100.0070.00717.01
7.2.90.0070.00717.07
7.2.80.0070.00717.02
7.2.70.0070.00717.07
7.2.60.0140.00017.14
7.2.50.0030.01217.07
7.2.40.0030.01316.99
7.2.30.0000.00917.09
7.2.20.0170.00016.78
7.2.10.0060.00616.93
7.2.00.0000.01517.11
7.1.330.0100.00715.83
7.1.320.0030.01015.68
7.1.310.0030.00915.83
7.1.300.0030.01016.03
7.1.290.0110.00315.94
7.1.280.0030.00815.95
7.1.270.0000.01215.68
7.1.260.0000.01015.79
7.1.250.0000.01415.68
7.1.240.0000.01015.86
7.1.230.0030.01015.75
7.1.220.0040.01115.86
7.1.210.0030.01015.78
7.1.200.0090.00315.86
7.1.190.0040.01115.71
7.1.180.0090.00615.84
7.1.170.0100.00315.77
7.1.160.0070.01015.86
7.1.150.0040.00815.73
7.1.140.0100.00715.93
7.1.130.0030.01115.87
7.1.120.0030.01015.57
7.1.110.0060.00315.88
7.1.100.0050.00817.06
7.1.90.0040.00815.63
7.1.80.0100.00715.71
7.1.70.0050.01016.59
7.1.60.0030.00816.54
7.1.50.0100.00616.17
7.1.40.0030.01315.90
7.1.30.0100.00316.03
7.1.20.0060.00615.94
7.1.10.0030.01315.96
7.1.00.0030.02119.10
7.0.330.0030.00515.38
7.0.320.0110.00415.14
7.0.310.0050.00315.50
7.0.300.0030.01015.45
7.0.290.0030.00915.34
7.0.280.0040.00715.38
7.0.270.0040.01115.54
7.0.260.0060.01215.19
7.0.250.0090.00615.57
7.0.240.0080.00015.25
7.0.230.0040.01115.38
7.0.220.0070.00415.54
7.0.210.0030.00615.45
7.0.200.0080.00616.11
7.0.190.0030.01015.43
7.0.180.0070.01015.54
7.0.170.0030.00815.30
7.0.160.0100.00015.56
7.0.150.0030.01515.62
7.0.140.0090.03818.61
7.0.130.0040.00815.37
7.0.120.0050.00515.66
7.0.110.0060.00315.48
7.0.100.0030.02617.88
7.0.90.0070.02017.80
7.0.80.0030.02517.71
7.0.70.0070.02017.64
7.0.60.0090.02117.77
7.0.50.0040.02217.89
7.0.40.0060.02916.84
7.0.30.0050.02416.77
7.0.20.0060.02616.82
7.0.10.0120.02516.74
7.0.00.0080.04016.81
5.6.400.0060.00614.66
5.6.390.0080.00614.47
5.6.380.0040.00714.16
5.6.370.0000.01214.54
5.6.360.0000.01514.51
5.6.350.0090.00614.69
5.6.340.0040.01114.54
5.6.330.0000.01814.44
5.6.320.0080.00414.61
5.6.310.0130.00014.70
5.6.300.0090.00914.57
5.6.290.0070.01014.44
5.6.280.0030.04017.68
5.6.270.0070.00714.81
5.6.260.0040.01514.22
5.6.250.0080.02017.54
5.6.240.0070.02117.65
5.6.230.0070.02417.64
5.6.220.0050.02617.58
5.6.210.0050.02317.75
5.6.200.0070.03217.84
5.6.190.0070.02817.91
5.6.180.0100.01717.84
5.6.170.0030.02517.79
5.6.160.0030.04917.82
5.6.150.0130.04217.73
5.6.140.0050.03517.78
5.6.130.0050.05017.91
5.6.120.0070.04017.83
5.6.110.0050.02617.84
5.6.100.0040.05117.82
5.6.90.0080.04517.70
5.6.80.0100.02517.25
5.6.70.0100.04317.47
5.6.60.0120.04017.49
5.6.50.0100.04317.49
5.6.40.0080.04517.43
5.6.30.0050.02517.45
5.6.20.0070.04017.56
5.6.10.0070.04517.48
5.6.00.0060.03417.41
5.5.380.0050.02217.47
5.5.370.0080.02317.38
5.5.360.0120.01717.62
5.5.350.0060.02117.43
5.5.340.0090.02617.56
5.5.330.0030.02217.59
5.5.320.0020.03117.66
5.5.310.0030.03017.79
5.5.300.0100.04117.71
5.5.290.0050.04817.83
5.5.280.0130.04017.60
5.5.270.0030.03317.62
5.5.260.0090.04817.59
5.5.250.0030.03917.57
5.5.240.0050.02517.39
5.5.230.0030.04717.14
5.5.220.0110.04117.39
5.5.210.0090.04117.42
5.5.200.0080.04017.27
5.5.190.0070.04417.42
5.5.180.0110.03617.37
5.5.170.0110.00814.55
5.5.160.0070.04517.37
5.5.150.0090.04517.34
5.5.140.0050.04817.17
5.5.130.0050.02517.33
5.5.120.0090.03817.29
5.5.110.0050.04517.29
5.5.100.0080.03817.34
5.5.90.0100.04317.23
5.5.80.0100.03717.25
5.5.70.0080.03717.32
5.5.60.0080.02117.19
5.5.50.0080.03017.25
5.5.40.0060.03617.17
5.5.30.0120.03816.97
5.5.20.0030.04517.36
5.5.10.0070.02517.13
5.5.00.0110.03817.24
5.4.450.0060.04215.57
5.4.440.0050.04315.58
5.4.430.0040.04215.61
5.4.420.0070.03515.55
5.4.410.0020.04215.60
5.4.400.0030.02415.52
5.4.390.0080.04715.43
5.4.380.0070.04215.43
5.4.370.0150.03515.44
5.4.360.0050.03715.44
5.4.350.0070.04115.47
5.4.340.0050.04215.51
5.4.330.0080.00011.83
5.4.320.0100.04015.48
5.4.310.0060.04415.48
5.4.300.0030.04215.50
5.4.290.0080.03215.53
5.4.280.0100.03515.37
5.4.270.0070.03015.35
5.4.260.0030.03615.46
5.4.250.0080.03815.53
5.4.240.0050.02715.46
5.4.230.0040.02315.34
5.4.220.0060.04015.44
5.4.210.0090.02015.49
5.4.200.0060.02915.50
5.4.190.0070.04015.45
5.4.180.0030.02415.43
5.4.170.0050.04015.49
5.4.160.0050.04115.42
5.4.150.0070.03215.43
5.4.140.0060.03914.17
5.4.130.0030.02414.12
5.4.120.0150.01614.06
5.4.110.0130.03514.10
5.4.100.0030.04214.16
5.4.90.0050.03814.18
5.4.80.0050.03614.18
5.4.70.0100.02614.17
5.4.60.0050.04214.18
5.4.50.0060.02314.12
5.4.40.0070.03714.20
5.4.30.0030.02614.11
5.4.20.0030.02514.15
5.4.10.0070.03814.17
5.4.00.0090.03713.87
5.3.290.0010.02913.31
5.3.280.0040.03813.30
5.3.270.0070.03813.25
5.3.260.0050.03513.30
5.3.250.0130.03813.26
5.3.240.0070.03513.25
5.3.230.0050.04413.22
5.3.220.0000.04613.27
5.3.210.0050.04213.25
5.3.200.0030.02613.26
5.3.190.0030.02713.27
5.3.180.0100.03813.27
5.3.170.0050.02313.26
5.3.160.0070.02813.30
5.3.150.0080.03813.27
5.3.140.0030.04313.25
5.3.130.0070.03213.18
5.3.120.0010.04613.21
5.3.110.0060.02513.18
5.3.100.0080.02612.98
5.3.90.0030.03813.01
5.3.80.0030.03512.92
5.3.70.0080.03513.00
5.3.60.0100.03313.01
5.3.50.0050.04012.97
5.3.40.0020.03712.87
5.3.30.0030.03212.96
5.3.20.0030.02212.87
5.3.10.0030.03112.82
5.3.00.0050.01812.82

preferences:
49.6 ms | 401 KiB | 5 Q