3v4l.org

run code in 300+ PHP versions simultaneously
<?php function aesCtr(string $m, string $n, string $k): string { return \openssl_decrypt($m, 'aes-128-ctr', $k, OPENSSL_RAW_DATA, $n); } $messages = [ 'wGVEtlgIETc4E4SNly0b7viJAv3bpO/85lC5/XCssVnMlrPc+TxeI+Jrsl+wVwQVOKbCEw8=', '2GxE9VRBC3giH5XMiSQXvfnGAeGHBqlXABl1mHrcabUCi8PLNlZCe+K1+3M9Vvb9nJo0AjHjuYkARV9h8WRywgFg+VSWKLb0K0lg+ZBVN70sJ+GRLrB6mCUK/ZeYucA=', '1mgX9w0TFzd2Ty69vfYaKmioBx7KaZoHHuCYCOEG519T2EQs6HJMIIle' ]; $key = hash('sha256', 'spottycats', true); var_dump(bin2hex($key)); $nonce = str_repeat("\x00", 16); // First, remove the base64 decoding: $base64decoded = [ base64_decode($messages[0]), base64_decode($messages[1]), base64_decode($messages[2]) ]; // The last 32 bytes are a HMAC. We can strip that. $stripLast32 = [ mb_substr($base64decoded[0], 0, -32, '8bit'), mb_substr($base64decoded[1], 0, -32, '8bit'), mb_substr($base64decoded[2], 0, -32, '8bit') ]; var_dump( bin2hex($stripLast32[0]), bin2hex($stripLast32[1]), bin2hex($stripLast32[2]), aesCtr($messages[0], $nonce, $key), aesCtr($messages[1], $nonce, $key), aesCtr($messages[2], $nonce, $key) );

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.0040.01116.75
8.3.50.0090.00916.26
8.3.40.0150.00018.79
8.3.30.0110.01118.67
8.3.20.0050.00320.14
8.3.10.0080.00023.46
8.3.00.0040.00423.61
8.2.180.0070.00718.41
8.2.170.0070.00722.96
8.2.160.0140.00019.11
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.52
8.2.120.0000.00726.35
8.2.110.0000.01021.06
8.2.100.0070.00418.03
8.2.90.0060.00319.17
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0000.00818.02
8.2.50.0050.00318.10
8.2.40.0000.00820.58
8.2.30.0040.00421.05
8.2.20.0050.00218.20
8.2.10.0040.00418.24
8.2.00.0040.00418.09
8.1.280.0090.00625.92
8.1.270.0030.00522.24
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0000.00922.73
8.1.230.0110.00020.28
8.1.220.0090.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0030.00518.55
8.1.160.0020.00518.81
8.1.150.0030.00520.12
8.1.140.0040.00419.08
8.1.130.0070.00318.96
8.1.120.0000.00717.51
8.1.110.0000.00917.51
8.1.100.0000.00817.37
8.1.90.0070.00017.48
8.1.80.0040.00417.48
8.1.70.0030.00317.52
8.1.60.0040.00417.70
8.1.50.0000.00817.53
8.1.40.0030.00617.55
8.1.30.0040.00417.64
8.1.20.0050.00317.68
8.1.10.0030.00617.73
8.1.00.0090.00017.58
8.0.300.0030.00519.09
8.0.290.0040.00416.75
8.0.280.0000.00818.56
8.0.270.0000.00717.35
8.0.260.0000.00720.32
8.0.250.0070.00017.12
8.0.240.0030.00617.10
8.0.230.0030.00316.98
8.0.220.0000.00717.01
8.0.210.0030.00316.93
8.0.200.0030.00316.95
8.0.190.0030.00617.01
8.0.180.0000.00717.09
8.0.170.0000.00717.08
8.0.160.0000.00717.02
8.0.150.0040.00416.84
8.0.140.0030.00617.00
8.0.130.0030.00313.53
8.0.120.0030.00616.96
8.0.110.0000.00716.87
8.0.100.0040.00416.95
8.0.90.0040.00417.06
8.0.80.0070.00717.02
8.0.70.0000.00816.93
8.0.60.0040.00417.03
8.0.50.0080.00017.01
8.0.30.0090.00917.16
8.0.20.0120.01217.40
8.0.10.0040.00416.99
8.0.00.0100.00916.77
7.4.330.0030.00315.55
7.4.320.0030.00316.42
7.4.300.0030.00316.61
7.4.290.0000.00716.51
7.4.280.0000.00816.66
7.4.270.0040.00416.54
7.4.260.0050.00316.41
7.4.250.0000.00816.55
7.4.240.0040.00416.39
7.4.230.0070.00016.33
7.4.220.0080.01416.62
7.4.210.0140.00716.39
7.4.200.0070.00016.50
7.4.160.0100.00616.58
7.4.150.0130.00417.40
7.4.140.0100.00717.86
7.4.130.0190.00316.60
7.4.120.0090.01016.58
7.4.110.0140.00416.58
7.4.100.0150.00716.46
7.4.90.0150.00616.44
7.4.80.0090.00619.39
7.4.70.0130.00716.50
7.4.60.0170.00316.45
7.4.50.0100.00516.52
7.4.40.0120.00616.59
7.4.30.0040.01316.61
7.4.00.0090.00915.02
7.3.330.0030.00313.25
7.3.320.0060.00013.24
7.3.310.0030.00316.42
7.3.300.0070.00016.26
7.3.290.0060.01316.30
7.3.280.0100.00716.28
7.3.270.0110.00717.40
7.3.260.0070.01316.62
7.3.250.0120.00616.50
7.3.240.0080.01316.45
7.3.230.0110.00516.36
7.3.210.0090.00916.61
7.3.200.0030.01316.47
7.3.190.0140.00616.39
7.3.180.0070.01016.51
7.3.170.0060.00916.30
7.3.160.0070.01016.40
7.3.120.0040.01815.02
7.3.110.0090.00915.03
7.3.100.0100.00614.85
7.3.90.0000.01314.83
7.3.80.0090.00014.66
7.3.70.0110.00014.86
7.3.60.0050.00514.60
7.3.50.0090.00614.63
7.3.40.0000.00914.96
7.3.30.0040.00714.73
7.3.20.0070.00716.55
7.3.10.0070.00716.45
7.3.00.0000.01116.50
7.2.330.0120.00616.74
7.2.320.0060.01316.83
7.2.310.0130.00416.89
7.2.300.0120.01216.61
7.2.290.0180.00016.66
7.2.250.0070.01415.26
7.2.240.0090.00915.16
7.2.230.0030.01015.09
7.2.220.0000.00915.02
7.2.210.0100.00315.14
7.2.200.0130.00014.87
7.2.190.0060.01015.05
7.2.180.0060.00615.13
7.2.170.0000.01115.10
7.2.60.0000.01516.98
7.2.50.0120.00016.97
7.1.330.0030.01415.66
7.1.320.0070.00715.79
7.1.310.0000.01115.82
7.1.300.0100.00315.60
7.1.290.0040.00416.02
7.1.280.0060.00615.81
7.1.270.0030.00815.78
7.1.260.0000.01415.59
7.1.200.0060.00615.83
7.1.110.0070.00718.07
7.1.100.0050.01017.80
7.1.90.0110.00817.96
7.1.80.0030.01418.08
7.1.70.0030.01017.20
7.1.60.0230.00735.07
7.1.50.0150.01534.68
7.1.40.0170.01434.73
7.1.30.0160.01634.73
7.1.20.0190.01934.83
7.1.10.0040.01116.82
7.1.00.0060.00916.93
7.0.250.0070.00717.84
7.0.240.0050.01017.68
7.0.230.0030.01517.67
7.0.220.0040.01317.89
7.0.210.0060.00916.48
7.0.200.0060.00916.39
7.0.190.0160.00316.79
7.0.180.0040.01416.25
7.0.170.0060.00916.30
7.0.160.0090.00616.39
7.0.150.0030.01216.52
7.0.140.0080.00816.46
7.0.130.0000.01516.61
7.0.120.0060.00816.56
7.0.110.0090.00616.37
7.0.100.0070.00716.49
7.0.90.0090.00516.36
7.0.80.0110.00416.50
7.0.70.0090.00516.54
7.0.60.0110.00316.35
7.0.50.0040.01216.47
7.0.40.0060.01216.47
7.0.30.0090.00916.45
7.0.20.0080.01116.41
7.0.10.0030.01416.49
7.0.00.0030.01016.64

preferences:
72.4 ms | 400 KiB | 5 Q