3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("ENCKEY", "w+2#)1FP&LIPTL2<8I2"); class CRYPT { public function encrypt($Str,$Key=ENCKEY) { srand(); $Str=str_pad($Str, 32-strlen($Str)); $IVSize=mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $IV=mcrypt_create_iv($IVSize, MCRYPT_RAND); $CryptStr=mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $Key, $Str, MCRYPT_MODE_CBC, $IV); return base64_encode($IV.$CryptStr); } public function decrypt($CryptStr,$Key=ENCKEY) { if ($CryptStr!='') { $IV=substr(base64_decode($CryptStr),0,16); $CryptStr=substr(base64_decode($CryptStr),16); return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $Key, $CryptStr, MCRYPT_MODE_CBC,$IV)); } else { return ''; } } } // class ENCRYPT() $s = "FGykgbMFQiTpVIRhO9HWL%2FwXYevfsd7ozE99pbDWge%2F2Fs8fQb1iqeaw3yAe%2BkLsmTgPUz7mo%2FsTfEsvEfldWEx9XU51gsM6T1othRV6rshB9ThE3BOOUKKnhqt%2FgYyUP6POu5HSr7Rem7TIJIEAPh4w1cTQNN2ZCXyYS4Y%2BC%2F8%3D"; $enc = new CRYPT; echo $enc->decrypt($s);

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.0070.01417.00
8.3.50.0130.00721.98
8.3.40.0130.00319.02
8.3.30.0080.00518.84
8.3.20.0080.00020.20
8.3.10.0080.00023.52
8.3.00.0080.00019.38
8.2.180.0120.00418.29
8.2.170.0070.00722.96
8.2.160.0070.00722.26
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0090.00317.63
8.2.120.0040.00426.35
8.2.110.0090.00021.05
8.2.100.0110.00017.72
8.2.90.0000.00817.82
8.2.80.0030.00617.97
8.2.70.0000.00917.48
8.2.60.0060.00317.80
8.2.50.0030.00618.07
8.2.40.0040.00419.34
8.2.30.0070.00020.68
8.2.20.0060.00317.84
8.2.10.0000.00818.16
8.2.00.0000.01018.00
8.1.280.0110.01125.92
8.1.270.0030.00522.14
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0030.00722.53
8.1.230.0110.00020.89
8.1.220.0040.00417.74
8.1.210.0030.00618.91
8.1.200.0000.01017.35
8.1.190.0000.00817.10
8.1.180.0070.00018.10
8.1.170.0070.00019.06
8.1.160.0000.00722.07
8.1.150.0040.00420.66
8.1.140.0000.00819.67
8.1.130.0040.00417.66
8.1.120.0030.00317.50
8.1.110.0000.00817.39
8.1.100.0040.00417.55
8.1.90.0040.00417.51
8.1.80.0050.00317.50
8.1.70.0040.00417.39
8.1.60.0030.00617.67
8.1.50.0080.00017.54
8.1.40.0080.00017.55
8.1.30.0000.00817.59
8.1.20.0000.00817.68
8.1.10.0040.00417.65
8.1.00.0040.00417.48
8.0.300.0030.00620.12
8.0.290.0040.00416.75
8.0.280.0030.00318.42
8.0.270.0030.00317.27
8.0.260.0070.00017.14
8.0.250.0040.00416.99
8.0.240.0030.00316.93
8.0.230.0000.00716.98
8.0.220.0000.00816.93
8.0.210.0030.00316.96
8.0.200.0000.00917.03
8.0.190.0030.00316.89
8.0.180.0040.00416.95
8.0.170.0000.00816.93
8.0.160.0000.00816.96
8.0.150.0020.00516.92
8.0.140.0000.00716.74
8.0.130.0070.00013.41
8.0.120.0040.00416.93
8.0.110.0040.00416.82
8.0.100.0000.00716.97
8.0.90.0070.00016.85
8.0.80.0060.01016.82
8.0.70.0070.00016.99
8.0.60.0030.00516.79
8.0.50.0040.00416.84
8.0.30.0100.00917.25
8.0.20.0060.01217.40
8.0.10.0040.00417.01
8.0.00.0050.01316.77
7.4.330.0000.00515.10
7.4.320.0030.00316.55
7.4.300.0000.00716.54
7.4.290.0040.00416.54
7.4.280.0000.00716.43
7.4.270.0030.00316.67
7.4.260.0030.00316.39
7.4.250.0050.00316.60
7.4.240.0040.00316.63
7.4.230.0000.00716.34
7.4.220.0120.00616.75
7.4.210.0130.00616.67
7.4.200.0030.00416.54
7.4.160.0090.01316.64
7.4.150.0090.00917.40
7.4.140.0080.01117.86
7.4.130.0110.00916.54
7.4.120.0150.00216.57
7.4.110.0090.00916.70
7.4.100.0140.00316.38
7.4.90.0030.01316.50
7.4.80.0140.00319.39
7.4.70.0080.00816.76
7.4.60.0100.00716.55
7.4.50.0040.00416.46
7.4.40.0070.01016.46
7.4.30.0100.00716.57
7.4.00.0060.00814.97
7.3.330.0000.00513.40
7.3.320.0050.00013.39
7.3.310.0050.00216.21
7.3.300.0020.00516.39
7.3.290.0130.00516.37
7.3.280.0130.00516.43
7.3.270.0110.00717.40
7.3.260.0150.00316.39
7.3.250.0110.00616.50
7.3.240.0080.00916.48
7.3.230.0070.01016.60
7.3.210.0040.01416.44
7.3.200.0130.00416.37
7.3.190.0100.00716.61
7.3.180.0100.00616.59
7.3.170.0110.00516.42
7.3.160.0000.01616.50
7.3.120.0070.01014.80
7.3.110.0090.00915.01
7.3.100.0060.01015.14
7.3.90.0070.00714.85
7.3.80.0080.00414.63
7.3.70.0030.00714.93
7.3.60.0070.00314.94
7.3.50.0070.01115.01
7.3.40.0000.01314.74
7.3.30.0090.00614.69
7.3.20.0030.01016.60
7.3.10.0000.01516.68
7.3.00.0090.00316.39
7.2.330.0150.00316.57
7.2.320.0060.01216.43
7.2.310.0150.00316.56
7.2.300.0070.01416.63
7.2.290.0130.01016.68
7.2.250.0060.01315.11
7.2.240.0090.00915.11
7.2.230.0100.01014.89
7.2.220.0030.00914.89
7.2.210.0040.01115.13
7.2.200.0040.01114.92
7.2.190.0040.01415.11
7.2.180.0040.01414.66
7.2.170.0030.00714.93
7.2.60.0060.00616.75
7.2.00.0080.00819.42
7.1.330.0000.01615.84
7.1.320.0060.00915.71
7.1.310.0110.00415.84
7.1.300.0060.01015.62
7.1.290.0040.01115.96
7.1.280.0100.00315.65
7.1.270.0140.00015.52
7.1.260.0090.00315.41
7.1.200.0030.00915.63
7.1.100.0070.00718.40
7.1.70.0030.00516.81
7.1.60.0110.01519.48
7.1.50.0070.00716.89
7.1.00.0100.07022.27
7.0.200.0030.00616.71
7.0.60.0130.06019.92
7.0.50.0030.08318.04
7.0.40.0070.05020.11
7.0.30.0300.03020.34
7.0.20.0400.07720.12
7.0.10.0100.08720.30
7.0.00.0100.08320.30
5.6.280.0100.06721.11
5.6.210.0070.08020.67
5.6.200.0100.07318.19
5.6.190.0030.04720.54
5.6.180.0170.05720.66
5.6.170.0200.03720.61
5.6.160.0070.04020.55
5.6.150.0030.08318.20
5.6.140.0100.07318.18
5.6.130.0100.07718.34
5.6.120.0100.06721.04
5.6.110.0030.04021.12
5.6.100.0100.08721.13
5.6.90.0070.06721.11
5.6.80.0130.07320.42
5.5.350.3900.04320.37
5.5.340.0070.08018.10
5.5.330.0130.07720.27
5.5.320.0230.05020.39
5.5.310.0270.07320.43
5.5.300.0130.07717.94
5.5.290.0130.06717.99
5.5.280.0070.04320.69
5.5.270.0070.04020.99
5.5.260.0130.08020.91
5.5.250.0200.06320.70
5.5.240.0270.07320.44

preferences:
53.82 ms | 401 KiB | 5 Q