3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt_decrypt($action, $string) { $output = false; $cipher = new Crypt_AES(CRYPT_AES_MODE_ECB); $cipher->setKey('8yh%@;%-_V!c*D;8*d-?.#WqF?#A;a/;@Xc._zS@;@p;F/Z!uG1;=X-Fb@/!g##m'); if( $action == 'encrypt' ) { $output = base64_encode($cipher->encrypt($string)); } else if( $action == 'decrypt' ){ $output = $cipher->decrypt(base64_decode($string)); } return $output; }

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.0100.01018.30
8.3.50.0090.00621.98
8.3.40.0110.00418.52
8.3.30.0100.00318.79
8.3.20.0070.00020.38
8.3.10.0080.00023.66
8.3.00.0050.00322.43
8.2.180.0120.00918.26
8.2.170.0070.00722.96
8.2.160.0100.00322.11
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00819.36
8.2.110.0070.00422.02
8.2.100.0090.00317.59
8.2.90.0000.00819.09
8.2.80.0040.00417.97
8.2.70.0060.00617.38
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0080.00019.45
8.2.30.0040.00417.82
8.2.20.0050.00217.56
8.2.10.0000.00717.55
8.2.00.0000.00717.56
8.1.280.0080.00525.92
8.1.270.0090.00021.78
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.82
8.1.230.0080.00319.09
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0060.00317.18
8.1.180.0040.00418.10
8.1.170.0030.00618.51
8.1.160.0040.00422.00
8.1.150.0040.00418.51
8.1.140.0050.00217.25
8.1.130.0030.00317.83
8.1.120.0030.00317.38
8.1.110.0080.00017.32
8.1.100.0000.00817.33
8.1.90.0040.00317.24
8.1.80.0070.00017.27
8.1.70.0000.00717.16
8.1.60.0000.00917.37
8.1.50.0000.00717.28
8.1.40.0000.00717.38
8.1.30.0000.00817.35
8.1.20.0000.00917.55
8.1.10.0040.00417.48
8.1.00.0050.00217.24
8.0.300.0000.00718.77
8.0.290.0030.00316.93
8.0.280.0000.00718.22
8.0.270.0070.00017.07
8.0.260.0070.00016.70
8.0.250.0000.00616.81
8.0.240.0070.00016.79
8.0.230.0000.00716.75
8.0.220.0030.00316.81
8.0.210.0000.00716.67
8.0.200.0060.00016.82
8.0.190.0000.00716.90
8.0.180.0000.00816.76
8.0.170.0000.00816.66
8.0.160.0040.00416.69
8.0.150.0000.00716.61
8.0.140.0090.00016.69
8.0.130.0030.00313.19
8.0.120.0000.00816.67
8.0.110.0040.00416.71
8.0.100.0070.00016.77
8.0.90.0040.00416.57
8.0.80.0060.00916.73
8.0.70.0040.00416.59
8.0.60.0040.00416.65
8.0.50.0030.00516.83
8.0.30.0100.01016.81
8.0.20.0100.00817.40
8.0.10.0070.00016.96
8.0.00.0080.01116.49
7.4.330.0070.00015.00
7.4.320.0000.00616.44
7.4.300.0060.00016.39
7.4.290.0000.00716.40
7.4.280.0040.00416.47
7.4.270.0030.00316.51
7.4.260.0000.00616.36
7.4.250.0000.00716.36
7.4.240.0020.00516.38
7.4.230.0070.00016.29
7.4.220.0110.00616.38
7.4.210.0090.00516.42
7.4.200.0030.00316.27
7.4.190.0030.00316.54
7.4.160.0130.00316.23
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0080.01016.40
7.4.120.0090.00816.33
7.4.110.0040.01316.28
7.4.100.0030.01316.19
7.4.90.0110.00716.32
7.4.80.0060.01716.38
7.4.70.0070.01016.18
7.4.60.0100.01316.47
7.4.50.0030.00316.14
7.4.40.0020.01122.77
7.4.30.0080.00816.36
7.4.00.0070.01014.77
7.3.330.0000.00513.02
7.3.320.0050.00013.12
7.3.310.0040.00416.20
7.3.300.0030.00316.09
7.3.290.0120.00916.18
7.3.280.0090.00916.17
7.3.270.0060.01217.40
7.3.260.0140.00416.19
7.3.250.0060.01316.25
7.3.240.0090.00616.41
7.3.230.0120.00316.39
7.3.210.0090.00816.46
7.3.200.0060.01619.39
7.3.190.0030.01416.31
7.3.180.0030.01316.15
7.3.170.0110.00816.27
7.3.160.0060.01016.32
7.3.120.0060.01114.58
7.3.110.0100.00614.60
7.3.100.0040.01114.58
7.3.90.0060.00914.64
7.3.80.0070.00814.63
7.3.70.0060.00714.54
7.3.60.0060.00714.66
7.3.50.0060.00714.59
7.3.40.0080.00614.58
7.3.30.0070.00514.56
7.3.20.0100.00316.49
7.3.10.0090.00616.46
7.3.00.0060.00916.41
7.2.330.0130.00316.23
7.2.320.0130.00716.36
7.2.310.0100.01316.54
7.2.300.0060.01316.33
7.2.290.0110.00716.39
7.2.250.0070.01014.74
7.2.240.0080.01114.94
7.2.230.0060.00914.81
7.2.220.0040.01314.86
7.2.210.0070.00614.90
7.2.200.0060.01014.77
7.2.190.0050.00514.92
7.2.180.0040.01014.78
7.2.170.0050.00914.88
7.2.00.0000.01319.23
7.1.330.0040.00915.42
7.1.320.0110.00315.54
7.1.310.0080.00715.59
7.1.300.0060.00815.53
7.1.290.0070.00615.47
7.1.280.0050.00415.60
7.1.270.0080.00315.65
7.1.260.0030.01115.51
7.1.100.0030.00517.82
7.1.70.0040.00416.93
7.1.60.0100.01419.29
7.1.50.0060.01916.79
7.1.00.0030.07722.36
7.0.200.0090.00316.54
7.0.140.0030.07321.91
7.0.110.0000.06719.91
7.0.100.0100.07720.10
7.0.90.0100.08720.02
7.0.80.0100.06719.84
7.0.70.0030.08720.04
7.0.60.0030.09019.90
7.0.50.0070.07020.28
7.0.40.0100.07019.95
7.0.30.0070.08320.22
7.0.20.0070.07320.03
7.0.10.0030.08719.97
7.0.00.0100.05020.03
5.6.280.0070.07021.15
5.6.260.0070.08020.68
5.6.250.0100.04020.73
5.6.240.0070.05020.66
5.6.230.0070.07720.69
5.6.220.0130.05020.46
5.6.210.0130.04320.64
5.6.200.0130.07321.27
5.6.190.0100.06720.99
5.6.180.0130.05721.14
5.6.170.0100.07021.14
5.6.160.0130.07321.08
5.6.150.0000.06321.03
5.6.140.0070.08321.29
5.6.130.0030.08721.29
5.6.120.0070.07321.29
5.6.110.0100.07721.28
5.6.100.0030.07320.95
5.6.90.0070.08321.00
5.6.80.0070.04720.50
5.6.70.0070.05720.53
5.6.60.0070.03720.57
5.6.50.0070.03720.44
5.6.40.0030.03720.45
5.6.30.0030.03720.50
5.6.20.0000.04320.30
5.6.10.0070.03720.43
5.6.00.0070.04020.49
5.5.380.0030.08320.36
5.5.370.0200.03720.55
5.5.360.0100.04720.24
5.5.350.0030.07720.41
5.5.340.0100.07020.96
5.5.330.0070.04020.93
5.5.320.0070.08720.73
5.5.310.0130.07320.85
5.5.300.0170.07020.82
5.5.290.0200.06320.78
5.5.280.0130.04320.89
5.5.270.0030.07720.80
5.5.260.0030.08721.04
5.5.250.0000.05320.68
5.5.240.0000.04320.20
5.5.230.0070.04320.35
5.5.220.0030.04720.08
5.5.210.0100.03320.37
5.5.200.0100.03320.06
5.5.190.0070.03720.05
5.5.180.0000.04320.17
5.5.160.0000.04320.16
5.5.150.0070.03720.26
5.5.140.0030.03720.26
5.5.130.0030.04020.25
5.5.120.0130.02720.26
5.5.110.0070.07020.30
5.5.100.0130.02720.26
5.5.90.0070.04020.21
5.5.80.0100.03720.00
5.5.70.0070.03720.09
5.5.60.0030.03720.01
5.5.50.0100.03320.10
5.5.40.0000.04720.13
5.5.30.0000.04720.15
5.5.20.0030.04020.19
5.5.10.0070.03720.01
5.5.00.0070.07320.13
5.4.450.0070.08019.66
5.4.440.0030.07719.64
5.4.430.0130.06719.34
5.4.420.0070.08019.30
5.4.410.0170.05719.38
5.4.400.0130.03719.25
5.4.390.0030.06319.03
5.4.380.0070.03719.22
5.4.370.0030.03719.22
5.4.360.0030.03719.14
5.4.350.0000.04019.02
5.4.340.0000.04019.18
5.4.320.0070.03319.01
5.4.310.0070.06019.01
5.4.300.0070.03319.14
5.4.290.0070.03318.95
5.4.280.0030.04019.18
5.4.270.0030.05719.01
5.4.260.0100.03019.14
5.4.250.0100.04318.98
5.4.240.0000.06018.98
5.4.230.0070.03318.98
5.4.220.0100.03319.17
5.4.210.0000.04018.96
5.4.200.0030.03719.30
5.4.190.0030.03719.22
5.4.180.0000.04318.99
5.4.170.0030.04019.02
5.4.160.0030.03719.16
5.4.150.0030.06719.07
5.4.140.0070.04016.35
5.4.130.0030.03716.59
5.4.120.0030.03716.47
5.4.110.0000.04016.46
5.4.100.0070.03016.51
5.4.90.0000.04316.26
5.4.80.0000.03716.34
5.4.70.0070.03016.60
5.4.60.0100.04016.58
5.4.50.0000.05016.50
5.4.40.0100.06316.53
5.4.30.0030.07716.56
5.4.20.0170.02316.52
5.4.10.0070.07716.23
5.4.00.0100.03716.00
5.3.290.0030.04014.68
5.3.280.0070.03314.68
5.3.270.0000.07014.70
5.3.260.0000.05314.73
5.3.250.0070.03314.58
5.3.240.0030.04014.61
5.3.230.0070.03714.63
5.3.220.0130.02714.65
5.3.210.0000.04014.60
5.3.200.0070.03014.57
5.3.190.0030.03714.70
5.3.180.0070.03314.66
5.3.170.0030.07314.70
5.3.160.0030.05314.57
5.3.150.0000.04014.60
5.3.140.0000.04014.57
5.3.130.0030.07314.55
5.3.120.0070.07314.51
5.3.110.0130.07014.41
5.3.100.0070.07014.12
5.3.90.0070.07014.03
5.3.80.0100.04314.15
5.3.70.0000.08314.04
5.3.60.0030.05014.01
5.3.50.0000.07013.95
5.3.40.0030.07313.96
5.3.30.0100.07013.97
5.3.20.0130.05713.70
5.3.10.0030.07313.66
5.3.00.0100.05713.63
5.2.170.0070.03012.14
5.2.160.0100.03012.14
5.2.150.0170.04712.14
5.2.140.0130.05312.14
5.2.130.0100.03712.14
5.2.120.0130.05012.14
5.2.110.0070.03712.14
5.2.100.0030.06012.14
5.2.90.0030.03712.14
5.2.80.0130.04012.14
5.2.70.0070.05712.14
5.2.60.0070.05712.14
5.2.50.0000.04012.14
5.2.40.0100.05312.14
5.2.30.0030.03712.14
5.2.20.0070.05712.14
5.2.10.0030.05312.14
5.2.00.0130.04712.14
5.1.60.0030.03712.14
5.1.50.0100.05012.14
5.1.40.0000.05712.14
5.1.30.0070.05012.14
5.1.20.0070.03012.14
5.1.10.0030.05712.14
5.1.00.0030.04712.14
5.0.50.0000.04312.14
5.0.40.0100.03312.14
5.0.30.0030.06312.14
5.0.20.0000.04712.14
5.0.10.0000.03712.14
5.0.00.0070.03712.14
4.4.90.0000.04012.14
4.4.80.0000.02312.14
4.4.70.0030.02012.14
4.4.60.0000.03712.14
4.4.50.0070.03012.14
4.4.40.0000.05312.14
4.4.30.0030.02712.14
4.4.20.0000.03712.14
4.4.10.0070.03012.14
4.4.00.0030.05312.14
4.3.110.0030.03012.14
4.3.100.0000.02012.14
4.3.90.0030.03312.14
4.3.80.0070.04312.14
4.3.70.0100.03012.14
4.3.60.0070.03012.14
4.3.50.0000.03712.14
4.3.40.0070.03712.14
4.3.30.0070.03012.14
4.3.20.0000.02712.14
4.3.10.0000.03712.14
4.3.00.0030.03312.14

preferences:
46.27 ms | 401 KiB | 5 Q