3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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() $enc = CRYPT;

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.00716.50
8.3.50.0220.01121.91
8.3.40.0070.01019.00
8.3.30.0040.01118.67
8.3.20.0000.00719.97
8.3.10.0080.00023.66
8.3.00.0000.00919.51
8.2.180.0090.00618.08
8.2.170.0140.00022.96
8.2.160.0140.00022.23
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0060.00617.63
8.2.120.0080.00026.35
8.2.110.0100.00021.18
8.2.100.0110.00017.84
8.2.90.0000.00817.84
8.2.80.0030.00617.97
8.2.70.0080.00017.75
8.2.60.0030.00617.80
8.2.50.0030.00618.07
8.2.40.0040.00419.45
8.2.30.0000.00820.59
8.2.20.0060.00317.79
8.2.10.0040.00418.16
8.2.00.0000.00818.11
8.1.280.0150.00025.92
8.1.270.0040.00423.99
8.1.260.0050.00228.09
8.1.250.0080.00028.09
8.1.240.0120.00922.56
8.1.230.0040.00821.03
8.1.220.0030.00517.74
8.1.210.0050.00518.89
8.1.200.0090.00017.23
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0000.00919.01
8.1.160.0000.00722.05
8.1.150.0080.00020.60
8.1.140.0050.00319.57
8.1.130.0020.00517.65
8.1.120.0000.00717.30
8.1.110.0050.00217.41
8.1.100.0050.00317.34
8.1.90.0040.00417.45
8.1.80.0070.00017.44
8.1.70.0040.00417.46
8.1.60.0030.00517.50
8.1.50.0040.00417.47
8.1.40.0000.00817.38
8.1.30.0060.00317.58
8.1.20.0030.00617.52
8.1.10.0060.00317.42
8.1.00.0040.00417.55
8.0.300.0030.00519.97
8.0.290.0050.00216.88
8.0.280.0040.00418.55
8.0.270.0070.00017.21
8.0.260.0040.00417.35
8.0.250.0000.00816.98
8.0.240.0040.00416.94
8.0.230.0080.00017.07
8.0.220.0030.00516.88
8.0.210.0030.00317.00
8.0.200.0030.00616.97
8.0.190.0000.00716.96
8.0.180.0070.00017.07
8.0.170.0050.00316.92
8.0.160.0000.00817.03
8.0.150.0050.00216.98
8.0.140.0040.00416.89
8.0.130.0070.00013.46
8.0.120.0070.00016.96
8.0.110.0070.00016.95
8.0.100.0000.00717.04
8.0.90.0000.00716.88
8.0.80.0160.00017.05
8.0.70.0070.00016.88
8.0.60.0050.00216.96
8.0.50.0040.00416.88
8.0.30.0160.00617.15
8.0.20.0110.00917.40
8.0.10.0000.00717.10
8.0.00.0060.01116.80
7.4.330.0060.00015.08
7.4.320.0030.00316.69
7.4.300.0000.00616.59
7.4.290.0000.00716.60
7.4.280.0040.00416.64
7.4.270.0030.00316.55
7.4.260.0040.00416.53
7.4.250.0080.00016.62
7.4.240.0040.00416.53
7.4.230.0030.00316.58
7.4.220.0100.01016.50
7.4.210.0050.01416.74
7.4.200.0030.00316.55
7.4.160.0110.01116.60
7.4.150.0090.01017.40
7.4.140.0140.00817.86
7.4.130.0100.01116.47
7.4.120.0080.00916.60
7.4.110.0110.00716.54
7.4.100.0160.00316.65
7.4.90.0060.01116.59
7.4.80.0030.01319.39
7.4.70.0070.01016.64
7.4.60.0060.01016.30
7.4.50.0000.00416.45
7.4.40.0070.01016.33
7.4.30.0060.01216.61
7.4.00.0100.00714.89
7.3.330.0020.00213.20
7.3.320.0000.00513.28
7.3.310.0030.00516.31
7.3.300.0050.00316.29
7.3.290.0080.00916.27
7.3.280.0090.01016.24
7.3.270.0100.00717.40
7.3.260.0070.01016.29
7.3.250.0100.00916.36
7.3.240.0080.00816.23
7.3.230.0030.01516.43
7.3.210.0060.01216.27
7.3.200.0000.01616.45
7.3.190.0060.01016.43
7.3.180.0090.00616.40
7.3.170.0080.00816.33
7.3.160.0100.00716.58
7.3.120.0090.00914.69
7.3.110.0120.00614.91
7.3.100.0030.01014.77
7.3.90.0080.00414.79
7.3.80.0060.00614.70
7.3.70.0100.00314.73
7.3.60.0060.00914.89
7.3.50.0100.00314.59
7.3.40.0040.01114.69
7.3.30.0100.00614.59
7.3.20.0090.00616.49
7.3.10.0080.00416.43
7.3.00.0000.01316.48
7.2.330.0150.00916.36
7.2.320.0130.00316.27
7.2.310.0100.00716.38
7.2.300.0170.00416.53
7.2.290.0130.00716.66
7.2.250.0040.01514.66
7.2.240.0100.01014.80
7.2.230.0060.01214.87
7.2.220.0000.01514.94
7.2.210.0120.00314.65
7.2.200.0040.01114.92
7.2.190.0100.00314.93
7.2.180.0060.01215.05
7.2.170.0040.00714.90
7.2.130.0100.00316.27
7.2.120.0040.00816.51
7.2.110.0000.01216.47
7.2.100.0080.00516.18
7.2.90.0080.00416.61
7.2.80.0060.01016.68
7.2.70.0060.00916.48
7.2.60.0040.00516.74
7.2.50.0000.01316.80
7.2.40.0100.00316.20
7.2.30.0060.00316.48
7.2.20.0120.00316.61
7.2.10.0080.00016.60
7.2.00.0050.00817.83
7.1.330.0070.00715.61
7.1.320.0030.01215.59
7.1.310.0130.00015.52
7.1.300.0100.00315.73
7.1.290.0120.00315.42
7.1.280.0110.00315.80
7.1.270.0000.01315.33
7.1.260.0030.00615.89
7.1.250.0060.00615.34
7.1.200.0000.01515.75
7.1.100.0040.00818.05
7.1.70.0040.00416.98
7.1.60.0080.01119.48
7.1.50.0000.01216.54
7.1.00.0100.07022.31
7.0.200.0040.00416.69
7.0.60.0100.08319.92
7.0.50.0070.08017.87
7.0.40.0000.05020.33
7.0.30.0270.03320.32
7.0.20.0370.07320.20
7.0.10.0100.06020.19
7.0.00.0100.04320.09
5.6.280.0100.06721.00
5.6.210.0000.06020.48
5.6.200.0030.07018.16
5.6.190.0000.04720.52
5.6.180.0430.06320.68
5.6.170.0170.04720.57
5.6.160.0100.03720.64
5.6.150.0070.05318.20
5.6.140.0070.05318.28
5.6.130.0170.08018.18
5.6.120.0130.04321.15
5.6.110.0000.04321.01
5.6.100.0130.03321.00
5.6.90.0100.04321.00
5.6.80.0070.06020.29
5.5.350.4400.05020.36
5.5.340.0030.05317.91
5.5.330.0070.04020.13
5.5.320.0370.06720.27
5.5.310.0430.07020.27
5.5.300.0070.04718.08
5.5.290.0170.07717.93
5.5.280.0000.05020.77
5.5.270.0130.06020.68
5.5.260.0170.07320.73
5.5.250.0130.06320.60
5.5.240.0200.04320.13

preferences:
57.88 ms | 401 KiB | 5 Q