3v4l.org

run code in 300+ PHP versions simultaneously
<?php const ENC_METHOD = 'aes-256-ctr'; const ENC_SALT = "87CD2488-180D-442B-A68A-0307DC0CAB4D"; function B2R_Encrypt($message, $key) { $key = hash("sha256", ENC_SALT + $key, FALSE); //$key = hash("sha256", ENC_SALT + $key, TRUE); echo $key; $nonceSize = openssl_cipher_iv_length(ENC_METHOD); $nonce = openssl_random_pseudo_bytes($nonceSize); $ciphertext = openssl_encrypt( $message, ENC_METHOD, $key, OPENSSL_RAW_DATA, $nonce ); $result = base64_encode($nonce.$ciphertext); echo "\r\n"; return $result; } $ToEncrypt = 'Some test string'; $encrypted = B2R_Encrypt($ToEncrypt, ''); echo $encrypted;

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.5.00.0150.00720.27
8.4.150.0020.00114.05
8.4.140.0140.00618.10
8.4.130.0150.00917.79
8.4.120.0110.00820.70
8.4.110.0090.01022.69
8.4.100.0110.00620.52
8.4.90.0140.00618.93
8.4.80.0090.00418.75
8.4.70.0120.00818.05
8.4.60.0140.00518.96
8.4.50.0150.00518.71
8.4.40.0060.00319.64
8.4.30.0090.00617.82
8.4.20.0060.01217.87
8.4.10.0060.00319.80
8.3.280.0120.00918.31
8.3.270.0140.00516.95
8.3.260.0110.00916.74
8.3.250.0130.00518.81
8.3.240.0100.01018.98
8.3.230.0120.00816.50
8.3.220.0020.00618.87
8.3.210.0100.00918.55
8.3.200.0060.00316.69
8.3.190.0100.00816.85
8.3.180.0100.00916.68
8.3.170.0090.00920.57
8.3.160.0070.01117.01
8.3.150.0170.00317.31
8.3.140.0040.01216.66
8.3.130.0030.00516.54
8.3.120.0040.00420.67
8.3.110.0000.00918.43
8.3.100.0030.00616.86
8.3.90.0040.00426.77
8.3.80.0100.00017.97
8.3.70.0110.00716.63
8.3.60.0100.00718.64
8.3.50.0160.00622.82
8.3.40.0110.00418.64
8.3.30.0000.01418.79
8.3.20.0000.00821.95
8.3.10.0040.00421.89
8.3.00.0050.00219.85
8.2.290.0110.00820.20
8.2.280.0100.00918.87
8.2.270.0110.00717.22
8.2.260.0100.00016.46
8.2.250.0160.00316.77
8.2.240.0090.00617.44
8.2.230.0080.00820.94
8.2.220.0110.00724.06
8.2.210.0070.00326.77
8.2.200.0060.00318.41
8.2.190.0090.00616.88
8.2.180.0060.01618.29
8.2.170.0070.00722.96
8.2.160.0060.00920.35
8.2.150.0090.00624.18
8.2.140.0030.00524.66
8.2.130.0040.00417.97
8.2.120.0080.00026.35
8.2.110.0060.00322.21
8.2.100.0040.00819.88
8.2.90.0040.00417.88
8.2.80.0040.00418.64
8.2.70.0000.00817.92
8.2.60.0060.00317.75
8.2.50.0000.00817.59
8.2.40.0050.00320.63
8.2.30.0070.00019.22
8.2.20.0040.00418.08
8.2.10.0040.00418.04
8.2.00.0090.00017.69
8.1.330.0110.00723.55
8.1.320.0110.00716.26
8.1.310.0030.00516.88
8.1.300.0060.00316.89
8.1.290.0100.00030.84
8.1.280.0100.01025.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0070.00323.88
8.1.230.0130.00318.96
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.01017.48
8.1.190.0070.00018.95
8.1.180.0040.00418.10
8.1.170.0100.00020.30
8.1.160.0040.00418.79
8.1.150.0040.00420.32
8.1.140.0000.00719.52
8.1.130.0070.00019.07
8.1.120.0000.00717.50
8.1.110.0040.00417.36
8.1.100.0080.00017.37
8.1.90.0000.00717.35
8.1.80.0040.00417.46
8.1.70.0000.00717.36
8.1.60.0040.00417.61
8.1.50.0030.00617.52
8.1.40.0000.00817.49
8.1.30.0040.00417.57
8.1.20.0000.00817.63
8.1.10.0000.00917.46
8.1.00.0040.00417.52
8.0.300.0060.00318.77
8.0.290.0000.00916.75
8.0.280.0040.00418.43
8.0.270.0030.00316.78
8.0.260.0000.00717.28
8.0.250.0040.00417.02
8.0.240.0000.00716.93
8.0.230.0030.00316.90
8.0.220.0040.00416.85
8.0.210.0000.00716.98
8.0.200.0080.00317.02
8.0.190.0050.00317.00
8.0.180.0050.00316.92
8.0.170.0040.00416.95
8.0.160.0000.00817.00
8.0.150.0040.00417.04
8.0.140.0000.00716.99
8.0.130.0000.00613.41
8.0.120.0060.00316.98
8.0.110.0030.00316.80
8.0.100.0070.00017.04
8.0.90.0040.00416.88
8.0.80.0100.01017.04
8.0.70.0040.00417.00
8.0.60.0000.00716.97
8.0.50.0070.00016.75
8.0.30.0090.00817.05
8.0.20.0080.01117.40
8.0.10.0000.00817.15
8.0.00.0170.00016.77
7.4.330.0060.00015.55
7.4.320.0000.00616.55
7.4.300.0030.00316.53
7.4.290.0070.00016.61
7.4.280.0110.00016.59
7.4.270.0030.00316.64
7.4.260.0030.00516.48
7.4.250.0030.00316.61
7.4.240.0020.00516.64
7.4.230.0030.00316.47
7.4.220.0090.01316.46
7.4.210.0030.01016.66
7.4.200.0030.00316.74
7.4.160.0080.00816.62
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0090.00916.51
7.4.120.0120.00716.68
7.4.110.0080.00816.57
7.4.100.0090.00916.44
7.4.90.0170.00616.59
7.4.80.0060.01819.39
7.4.70.0150.00316.71
7.4.60.0030.01316.85
7.4.50.0080.00616.39
7.4.40.0130.00316.33
7.4.30.0130.00716.61
7.4.00.0090.00914.80
7.3.330.0050.00013.36
7.3.320.0000.00513.39
7.3.310.0000.00716.45
7.3.300.0000.00716.38
7.3.290.0070.00916.41
7.3.280.0060.01016.37
7.3.270.0090.00617.40
7.3.260.0100.00716.47
7.3.250.0120.00816.47
7.3.240.0130.00616.54
7.3.230.0090.00716.32
7.3.210.0000.01616.41
7.3.200.0040.01216.47
7.3.190.0100.00716.74
7.3.180.0060.00916.41
7.3.170.0100.01016.68
7.3.160.0150.00916.59
7.3.120.0060.01314.93
7.3.110.0030.01014.75
7.3.100.0060.00914.94
7.3.90.0090.00914.93
7.3.80.0090.00614.81
7.3.70.0090.00915.01
7.3.60.0090.00615.02
7.3.50.0040.01114.96
7.3.40.0100.00314.90
7.3.30.0120.00414.93
7.3.20.0040.01116.70
7.3.10.0000.01416.83
7.3.00.0090.00616.84
7.2.330.0030.01316.52
7.2.320.0100.00716.78
7.2.310.0060.01616.79
7.2.300.0060.01216.53
7.2.290.0120.00416.84
7.2.250.0100.01015.25
7.2.240.0040.01815.21
7.2.230.0130.00615.27
7.2.220.0040.01515.10
7.2.210.0030.00915.37
7.2.200.0060.01315.04
7.2.190.0070.00715.23
7.2.180.0050.00515.09
7.2.170.0000.01415.04
7.2.00.0070.00319.65
7.1.330.0060.01015.98
7.1.320.0040.00815.68
7.1.310.0030.00615.51
7.1.300.0030.01215.64
7.1.290.0040.00915.87
7.1.280.0000.01315.86
7.1.270.0120.00015.73
7.1.260.0030.00915.77
7.1.70.0030.00617.32
7.1.60.0060.00617.36
7.1.50.0100.00317.23
7.1.10.0130.08322.45
7.1.00.0030.08322.54
7.0.200.0090.00616.87
7.0.150.0070.08721.96
7.0.140.0070.06321.86
7.0.130.0200.06021.91
7.0.120.0070.06322.07
7.0.110.0130.05322.08
7.0.100.0000.06722.07
7.0.90.0100.07722.02
7.0.80.0100.06322.16
7.0.70.0200.05722.04
7.0.60.0100.06321.88
7.0.50.0100.05722.11
7.0.40.0130.06022.04
7.0.30.0200.06022.08
7.0.20.0070.06021.93
7.0.10.0030.06322.07
7.0.00.0070.05721.97

preferences:
160.26 ms | 403 KiB | 5 Q