3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pubkey = '...public key here...'; $privkey = '...private key here...'; function encrypt($data) { global $pubkey, $privkey; if (openssl_public_encrypt($data, $encrypted, $pubkey)) $data = base64_encode($encrypted); else throw new Exception('Unable to encrypt data. Perhaps it is bigger than the key size?'); return $data; } function decrypt($data) { global $pubkey, $privkey; if (openssl_private_decrypt(base64_decode($data), $decrypted, $privkey)) $data = $decrypted; else $data = ''; return $data; } $e = encrypt('hello'); var_dump($e); var_dump(decrypt($e));

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.0090.00916.75
8.3.50.0140.00521.92
8.3.40.0130.00918.76
8.3.30.0190.00318.71
8.3.20.0040.00420.21
8.3.10.0080.00023.27
8.3.00.0030.00619.38
8.2.180.0060.00916.88
8.2.170.0090.00622.96
8.2.160.0040.01120.43
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0030.00617.75
8.2.120.0070.00026.35
8.2.110.0060.00319.21
8.2.100.0080.00317.84
8.2.90.0000.00817.63
8.2.80.0040.00418.86
8.2.70.0080.00018.03
8.2.60.0000.00817.91
8.2.50.0040.00418.10
8.2.40.0050.00220.59
8.2.30.0030.00320.65
8.2.20.0050.00517.79
8.2.10.0000.00718.04
8.2.00.0000.00718.06
8.1.280.0100.00325.92
8.1.270.0080.00023.83
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00622.42
8.1.230.0110.00020.89
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0060.00317.23
8.1.180.0000.00718.10
8.1.170.0000.00918.58
8.1.160.0000.00721.88
8.1.150.0000.00718.76
8.1.140.0050.00319.53
8.1.130.0000.00717.57
8.1.120.0000.00817.45
8.1.110.0040.00417.38
8.1.100.0030.00517.43
8.1.90.0000.00717.48
8.1.80.0040.00417.43
8.1.70.0080.00017.34
8.1.60.0040.00417.51
8.1.50.0040.00417.55
8.1.40.0020.00517.48
8.1.30.0040.00417.67
8.1.20.0040.00417.64
8.1.10.0040.00417.50
8.1.00.0030.00617.55
8.0.300.0020.00519.82
8.0.290.0040.00416.63
8.0.280.0030.00318.47
8.0.270.0030.00517.26
8.0.260.0000.00617.27
8.0.250.0030.00316.86
8.0.240.0000.00716.86
8.0.230.0000.00717.00
8.0.220.0000.00816.80
8.0.210.0050.00316.83
8.0.200.0030.00316.88
8.0.190.0040.00416.88
8.0.180.0000.00716.82
8.0.170.0000.00716.96
8.0.160.0040.00416.95
8.0.150.0000.00816.87
8.0.140.0040.00416.86
8.0.130.0030.00313.36
8.0.120.0000.00816.90
8.0.110.0040.00416.79
8.0.100.0040.00416.74
8.0.90.0040.00417.02
8.0.80.0030.01416.95
8.0.70.0080.00016.77
8.0.60.0000.00816.91
8.0.50.0050.00316.95
8.0.30.0070.01316.98
8.0.20.0080.01017.40
8.0.10.0040.00416.90
8.0.00.0090.01016.87
7.4.330.0060.00016.71
7.4.320.0040.00416.40
7.4.300.0040.00416.50
7.4.290.0000.00716.50
7.4.280.0000.00816.48
7.4.270.0000.00716.51
7.4.260.0030.00316.52
7.4.250.0040.00416.47
7.4.240.0040.00316.53
7.4.230.0000.00816.41
7.4.220.0110.00816.59
7.4.210.0030.01116.71
7.4.200.0000.00716.45
7.4.160.0080.00816.30
7.4.150.0100.01017.40
7.4.140.0120.01017.86
7.4.130.0100.00716.52
7.4.120.0140.00916.52
7.4.110.0130.00316.67
7.4.100.0100.01516.64
7.4.90.0060.01116.52
7.4.80.0070.01019.39
7.4.70.0100.01016.47
7.4.60.0030.01316.61
7.4.50.0090.00616.56
7.4.40.0160.00316.57
7.4.30.0090.01016.56
7.4.10.0110.00714.76
7.4.00.0030.01314.98
7.3.330.0000.00813.15
7.3.320.0030.00313.30
7.3.310.0090.00016.38
7.3.300.0070.00016.42
7.3.290.0070.00816.33
7.3.280.0080.01016.32
7.3.270.0070.01017.40
7.3.260.0160.00616.59
7.3.250.0150.00416.39
7.3.240.0070.01216.31
7.3.230.0060.01116.39
7.3.210.0070.01016.30
7.3.200.0140.00716.29
7.3.190.0060.01016.42
7.3.180.0160.00616.23
7.3.170.0040.01216.27
7.3.160.0070.01016.41
7.3.130.0120.00614.89
7.3.120.0110.00414.81
7.3.110.0100.00714.98
7.3.100.0070.00714.81
7.3.90.0030.01014.71
7.3.80.0100.00614.88
7.3.70.0060.01214.85
7.3.60.0100.00314.85
7.3.50.0110.00414.69
7.3.40.0060.00614.83
7.3.30.0030.01014.57
7.3.20.0120.00316.61
7.3.10.0060.00816.41
7.3.00.0120.00316.50
7.2.330.0100.00716.33
7.2.320.0050.01316.59
7.2.310.0170.00616.29
7.2.300.0100.00716.44
7.2.290.0100.01016.63
7.2.260.0100.00714.80
7.2.250.0070.01014.98
7.2.240.0110.00314.60
7.2.230.0030.01414.78
7.2.220.0090.00614.57
7.2.210.0040.01414.77
7.2.200.0080.00314.91
7.2.190.0110.00414.78
7.2.180.0060.00814.98
7.2.170.0030.00614.53
7.2.160.0060.00914.96
7.2.150.0060.00916.82
7.2.140.0080.00316.84
7.2.130.0030.01016.51
7.2.120.0040.00816.81
7.2.110.0090.00616.85
7.2.100.0030.01316.85
7.2.90.0060.00916.66
7.2.80.0030.00916.68
7.2.70.0080.00616.72
7.2.60.0070.00916.58
7.2.50.0090.00616.79
7.2.40.0090.00616.91
7.2.30.0050.00516.91
7.2.20.0070.00716.77
7.2.10.0080.00416.61
7.2.00.0040.00917.92
7.1.330.0060.00915.34
7.1.320.0070.01015.73
7.1.310.0100.00315.47
7.1.300.0050.00315.71
7.1.290.0040.00915.60
7.1.280.0030.00915.48
7.1.270.0100.00315.50
7.1.260.0040.00815.64
7.1.250.0090.00615.75
7.1.240.0000.01515.61
7.1.230.0050.00515.57
7.1.220.0100.00315.62
7.1.210.0030.01015.80
7.1.200.0060.00815.56
7.1.190.0070.00715.47
7.1.180.0040.00715.67
7.1.170.0070.00615.84
7.1.160.0040.00815.46
7.1.150.0070.00715.39
7.1.140.0080.00415.70
7.1.130.0070.00415.57
7.1.120.0100.00315.80
7.1.110.0000.01215.81
7.1.100.0050.00916.91
7.1.90.0070.00715.72
7.1.80.0090.00615.77
7.1.70.0060.00716.37
7.1.60.0020.01617.52
7.1.50.0050.01016.35
7.1.40.0120.00015.69
7.1.30.0040.00715.50
7.1.20.0000.01415.61
7.1.10.0000.01415.68
7.1.00.0020.04519.03
7.0.330.0100.00715.47
7.0.320.0030.01415.23
7.0.310.0030.01015.29
7.0.300.0050.00515.23
7.0.290.0030.00915.46
7.0.280.0030.01015.41
7.0.270.0070.01015.42
7.0.260.0000.01015.25
7.0.250.0060.00315.21
7.0.240.0070.01015.46
7.0.230.0070.00715.34
7.0.220.0070.00715.30
7.0.210.0030.00515.43
7.0.200.0030.01016.12
7.0.190.0070.00715.34
7.0.180.0120.00315.42
7.0.170.0040.00715.33
7.0.160.0040.00415.01
7.0.150.0030.00615.30
7.0.140.0000.00915.39
7.0.130.0000.00915.13
7.0.120.0070.00315.46
7.0.110.0040.00815.06
7.0.100.0060.00615.11
7.0.90.0030.00615.23
7.0.80.0100.00315.38
7.0.70.0070.01015.13
7.0.60.0070.04417.53
7.0.50.0050.02516.67
7.0.40.0090.04116.73
7.0.30.0230.03716.69
7.0.20.0260.03616.78
7.0.10.0070.04716.73
7.0.00.0080.02316.65
5.6.400.0090.00314.23
5.6.390.0090.00614.23
5.6.380.0120.00413.79
5.6.370.0030.00914.20
5.6.360.0100.00313.89
5.6.350.0030.01014.47
5.6.340.0080.00514.46
5.6.330.0030.01314.28
5.6.320.0030.00914.32
5.6.310.0040.00814.31
5.6.300.0060.00314.36
5.6.290.0060.00614.06
5.6.280.0040.01114.39
5.6.270.0030.00613.92
5.6.260.0070.00714.20
5.6.250.0000.01114.31
5.6.240.0000.01414.23
5.6.230.0120.00014.13
5.6.220.0060.00914.25
5.6.210.0100.03217.44
5.6.200.0070.03816.36
5.6.190.0070.04717.35
5.6.180.0180.04317.50
5.6.170.0150.04017.28
5.6.160.0060.03017.34
5.6.150.0120.04016.19
5.6.140.0030.02916.19
5.6.130.0060.02616.34
5.6.120.0090.04317.47
5.6.110.0030.04617.46
5.6.100.0070.03617.56
5.6.90.0050.05117.75
5.6.80.0030.02517.47
5.6.70.0110.00414.03
5.6.60.0080.00313.88
5.6.50.0000.01113.78
5.6.40.0060.00614.08
5.6.30.0060.00313.91
5.6.20.0030.00914.21
5.6.10.0060.00614.15
5.6.00.0080.00413.91
5.5.380.0070.00714.16
5.5.370.0070.00314.09
5.5.360.0060.00914.37
5.5.350.0100.04317.31
5.5.340.0090.04316.19
5.5.330.0000.03017.33
5.5.320.0070.03817.27
5.5.310.0220.04117.22
5.5.300.0080.02416.01
5.5.290.0070.04615.99
5.5.280.0050.03817.37
5.5.270.0120.04217.65
5.5.260.0050.04917.66
5.5.250.0070.04117.31
5.5.240.0160.04317.31
5.5.230.0060.00914.13
5.5.220.0000.01214.03
5.5.210.0070.00413.96
5.5.200.0040.01114.00
5.5.190.0040.00814.16
5.5.180.0140.00014.01
5.5.170.0030.01014.13
5.5.160.0000.01614.33
5.5.150.0030.01013.97
5.5.140.0030.00614.25
5.5.130.0120.00413.81
5.5.120.0030.01113.86
5.5.110.0030.00613.97
5.5.100.0040.01114.20
5.5.90.0030.01014.18
5.5.80.0070.00714.11
5.5.70.0040.00714.16
5.5.60.0070.00713.64
5.5.50.0000.00914.09
5.5.40.0070.00713.75
5.5.30.0060.00314.21
5.5.20.0030.00914.11
5.5.10.0000.00814.20
5.5.00.0140.00014.21

preferences:
53.16 ms | 401 KiB | 5 Q