3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'This text will encrypt using openssl!'; $secretKey = 'mykey'; function encrypt($data, $secretKey) { return trim(strtr(base64_encode(openssl_encrypt($data, 'AES-256-CBC', $secretKey, 0, openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')))),'+/=', '-_,')); } $encrypted = encrypt($data, $secretKey); function decrypt($encrypted, $secretKey) { return trim(openssl_decrypt(base64_decode(strtr($encrypted,'-_,', '+/=')),'AES-256-CBC', $secretKey, 0, openssl_cipher_iv_length('AES-256-CBC'))); } $decrypted = decrypt($encrypted, $secretKey); var_dump('Encrypted: ' . $encrypted); var_dump('Decrypted: ' . $decrypted); ?>

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.40.0060.00918.61
8.3.30.0140.00018.45
8.3.20.0000.00720.21
8.3.10.0070.00021.80
8.3.00.0080.00018.04
8.2.170.0110.00422.96
8.2.160.0000.01320.97
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00320.22
8.2.120.0040.00426.35
8.2.110.0000.00922.27
8.2.100.0090.00418.99
8.2.90.0040.00419.59
8.2.80.0050.00318.04
8.2.70.0030.00517.93
8.2.60.0060.00317.97
8.2.50.0000.00818.10
8.2.40.0040.00422.13
8.2.30.0050.00219.20
8.2.20.0040.00418.04
8.2.10.0030.00518.15
8.2.00.0070.00018.30
8.1.270.0070.00023.82
8.1.260.0040.00426.35
8.1.250.0030.00728.09
8.1.240.0030.00721.09
8.1.230.0070.00419.01
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.66
8.1.160.0040.00418.75
8.1.150.0000.00820.02
8.1.140.0040.00419.54
8.1.130.0030.00319.02
8.1.120.0080.00218.06
8.1.110.0080.00417.99
8.1.100.0050.00618.00
8.1.90.0110.00117.99
8.1.80.0000.01117.98
8.1.70.0050.00618.05
8.1.60.0090.00318.17
8.1.50.0090.00518.06
8.1.40.0100.00318.12
8.1.30.0080.00518.28
8.1.20.0100.00218.17
8.1.10.0130.00018.18
8.1.00.0090.00418.05
8.0.300.0070.00020.04
8.0.290.0000.00716.75
8.0.280.0000.00718.30
8.0.270.0030.00317.24
8.0.260.0030.00318.93
8.0.250.0020.00517.46
8.0.240.0050.00617.56
8.0.230.0090.00317.54
8.0.220.0060.00517.35
8.0.210.0070.00317.34
8.0.200.0070.00317.46
8.0.190.0070.00417.51
8.0.180.0060.00517.52
8.0.170.0070.00417.50
8.0.160.0040.00617.43
8.0.150.0100.00017.44
8.0.140.0070.00417.36
8.0.130.0040.00615.71
8.0.120.0050.00517.37
8.0.110.0080.00417.41
8.0.100.0100.00117.39
8.0.90.0040.00817.53
8.0.80.0110.00417.42
8.0.70.0050.00717.38
8.0.60.0070.00417.40
8.0.50.0050.00517.32
8.0.30.0130.00417.35
8.0.20.0110.00917.53
8.0.10.0060.00317.59
8.0.00.0150.00317.41
7.4.330.0060.00114.92
7.4.320.0070.00516.94
7.4.300.0060.00117.03
7.4.290.0050.00517.00
7.4.280.0070.00517.00
7.4.270.0050.00717.02
7.4.260.0000.00817.11
7.4.250.0020.00617.09
7.4.240.0070.00217.15
7.4.230.0040.00416.95
7.4.220.0100.00717.17
7.4.210.0060.00916.74
7.4.200.0020.00716.80
7.4.190.0070.00317.76
7.4.180.0050.00517.71
7.4.160.0080.00916.88
7.4.150.0050.00817.44
7.4.140.0090.00717.70
7.4.130.0070.00816.87
7.4.120.0070.01316.71
7.4.110.0090.00417.09
7.4.100.0080.00517.21
7.4.90.0060.00816.92
7.4.80.0100.00318.25
7.4.70.0100.00517.04
7.4.60.0110.00217.04
7.4.50.0090.00416.93
7.4.40.0070.00616.98
7.4.30.0020.01316.88
7.4.20.0100.00017.64
7.4.10.0000.01017.61
7.4.00.0100.00516.38
7.3.330.0080.00315.19
7.3.320.0070.00415.38
7.3.310.0090.00116.87
7.3.300.0070.00416.90
7.3.290.0030.00716.90
7.3.280.0090.01016.43
7.3.270.0090.00717.44
7.3.260.0110.00716.75
7.3.250.0120.00816.71
7.3.240.0110.00716.70
7.3.230.0140.00516.85
7.3.220.0160.00017.37
7.3.210.0110.00516.94
7.3.200.0100.01016.78
7.3.190.0110.00416.83
7.3.180.0070.00816.87
7.3.170.0100.00516.79
7.3.160.0110.00616.87
7.3.150.0140.00017.23
7.3.140.0100.00517.34
7.3.130.0140.00017.27
7.3.120.0090.00716.01
7.3.110.0120.00216.00
7.3.100.0090.00516.07
7.3.90.0070.00616.29
7.3.80.0080.00616.15
7.3.70.0060.00716.02
7.3.60.0060.00816.03
7.3.50.0090.00416.21
7.3.40.0090.00616.13
7.3.30.0070.00616.06
7.3.20.0060.00917.98
7.3.10.0060.00817.87
7.3.00.0040.01117.90
7.2.340.0100.00417.25
7.2.330.0120.00716.96
7.2.320.0120.00616.98
7.2.310.0090.00816.87
7.2.300.0100.00516.88
7.2.290.0110.00416.80
7.2.280.0100.00517.45
7.2.270.0070.00717.28
7.2.260.0070.00717.34
7.2.250.0090.00716.23
7.2.240.0090.00816.05
7.2.230.0120.00316.09
7.2.220.0080.00616.03
7.2.210.0090.00616.13
7.2.200.0100.00616.29
7.2.190.0090.00716.10
7.2.180.0090.00616.16
7.2.170.0030.01116.21
7.2.160.0080.00617.45
7.2.150.0130.00319.42
7.2.140.0080.00619.30
7.2.130.0110.00419.57
7.2.120.0120.00219.39
7.2.110.0070.00719.41
7.2.100.0100.00519.30
7.2.90.0040.01119.34
7.2.80.0110.00419.31
7.2.70.0090.00619.50
7.2.60.0140.00019.50
7.2.50.0110.00419.26
7.2.40.0070.00719.37
7.2.30.0120.00419.50
7.2.20.0140.00019.39
7.2.10.0120.00519.32
7.2.00.0050.00819.49
7.1.330.0070.00916.88
7.1.320.0060.00617.07
7.1.310.0020.01217.09
7.1.300.0070.00616.95
7.1.290.0100.00316.92
7.1.280.0100.00317.05
7.1.270.0090.00416.93
7.1.260.0030.01116.95
7.1.250.0070.00718.15
7.1.240.0140.00018.14
7.1.230.0080.00618.33
7.1.220.0110.00218.24
7.1.210.0100.00518.46
7.1.200.0100.00518.30
7.1.190.0090.00518.25
7.1.180.0090.00418.31
7.1.170.0110.00318.25
7.1.160.0130.00018.14
7.1.150.0130.00318.18
7.1.140.0110.00318.31
7.1.130.0100.00318.14
7.1.120.0120.00318.34
7.1.110.0090.00518.37
7.1.100.0100.00318.37
7.1.90.0100.00318.15
7.1.80.0140.00018.42
7.1.70.0080.00217.73
7.1.60.0050.01117.91
7.1.50.0130.00317.65
7.1.40.0220.00925.45
7.1.30.0240.00725.43
7.1.20.0290.00525.43
7.1.10.0220.00516.50
7.1.00.0200.00816.50
7.0.330.0100.00318.15
7.0.320.0090.00518.12
7.0.310.0080.00418.04
7.0.300.0130.00018.11
7.0.290.0090.00417.98
7.0.280.0060.00618.01
7.0.270.0090.00518.09
7.0.260.0080.00518.00
7.0.250.0050.01018.06
7.0.240.0080.00418.15
7.0.230.0100.00318.25
7.0.220.0130.00018.16
7.0.210.0140.00018.02
7.0.200.0130.00517.38
7.0.190.0070.00718.03
7.0.180.0200.00516.32
7.0.170.0180.00716.29
7.0.160.0160.00816.26
7.0.150.0190.00716.21
7.0.140.0200.00716.34
7.0.130.0200.00616.24
7.0.120.0260.00816.42
7.0.110.0180.01016.30
7.0.100.0200.00716.40
7.0.90.0180.00816.16
7.0.80.0190.00816.29
7.0.70.0220.00516.28
7.0.60.0230.00916.25
7.0.50.0290.00516.14
7.0.40.0180.00616.43
7.0.30.0180.00816.40
7.0.20.0290.00816.42
7.0.10.0250.01216.43
7.0.00.0230.00516.45
5.6.400.0090.00416.88
5.6.390.0130.00016.87
5.6.380.0060.00616.95
5.6.370.0130.00016.73
5.6.360.0120.00016.73
5.6.350.0000.01216.93
5.6.340.0080.00416.85
5.6.330.0160.00016.94
5.6.320.0040.00916.79
5.6.310.0080.00416.83
5.6.300.0130.00016.81
5.6.290.0130.00016.83
5.6.280.0060.00616.88
5.6.270.0120.00016.80
5.6.260.0120.00016.80
5.6.250.0120.00016.77
5.6.240.0000.01316.98
5.6.230.0120.00016.90
5.6.220.0070.00716.91
5.6.210.0090.00516.86
5.6.200.0040.00817.05
5.6.190.0130.00017.10
5.6.180.0120.00016.93
5.6.170.0080.00416.95
5.6.160.0130.00016.88
5.6.150.0080.00417.04
5.6.140.0080.00416.91
5.6.130.0130.00016.77
5.6.120.0080.00416.99
5.6.110.0070.00516.89
5.6.100.0080.00416.93
5.6.90.0060.00616.91
5.6.80.0060.00616.82
5.6.70.0070.00516.85
5.6.60.0140.00017.05
5.6.50.0090.00316.82
5.6.40.0070.00516.77
5.6.30.0130.00016.92
5.6.20.0060.00616.83
5.6.10.0070.00516.85
5.6.00.0120.00016.75

preferences:
43.18 ms | 400 KiB | 5 Q