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); $nonce = str_repeat("\0", 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.0120.00316.50
8.3.40.0100.00718.97
8.3.30.0060.01218.84
8.3.20.0040.00420.34
8.3.10.0040.00423.58
8.3.00.0050.00221.86
8.2.180.0070.01116.75
8.2.170.0070.00718.80
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00420.34
8.2.120.0040.00426.35
8.2.110.0060.00321.00
8.2.100.0120.00617.90
8.2.90.0000.00719.05
8.2.80.0090.00017.97
8.2.70.0000.00817.63
8.2.60.0030.00618.03
8.2.50.0080.00018.15
8.2.40.0000.00820.65
8.2.30.0060.00321.09
8.2.20.0040.00418.12
8.2.10.0000.00718.02
8.2.00.0000.00818.05
8.1.280.0110.00425.92
8.1.270.0060.00322.24
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00721.31
8.1.230.0040.00717.76
8.1.220.0040.00417.80
8.1.210.0050.00318.77
8.1.200.0090.00017.22
8.1.190.0000.00817.25
8.1.180.0050.00318.10
8.1.170.0000.00818.49
8.1.160.0070.00018.83
8.1.150.0050.00220.12
8.1.140.0070.00019.09
8.1.130.0000.00719.07
8.1.120.0000.00717.53
8.1.110.0030.00517.36
8.1.100.0040.00417.45
8.1.90.0050.00317.40
8.1.80.0040.00417.41
8.1.70.0070.00017.46
8.1.60.0030.00517.57
8.1.50.0040.00417.61
8.1.40.0000.00717.58
8.1.30.0000.00717.73
8.1.20.0040.00417.75
8.1.10.0040.00417.65
8.1.00.0060.00317.45
8.0.300.0060.00318.77
8.0.290.0040.00716.75
8.0.280.0030.00318.42
8.0.270.0040.00417.29
8.0.260.0050.00218.95
8.0.250.0000.00717.13
8.0.240.0000.01017.14
8.0.230.0030.00317.00
8.0.220.0050.00216.95
8.0.210.0020.00516.94
8.0.200.0000.00717.01
8.0.190.0050.00317.00
8.0.180.0070.00017.12
8.0.170.0030.00517.06
8.0.160.0080.00017.08
8.0.150.0040.00416.87
8.0.140.0100.00016.89
8.0.130.0030.00313.46
8.0.120.0000.00916.94
8.0.110.0000.00716.96
8.0.100.0060.00317.02
8.0.90.0070.00016.95
8.0.80.0080.00717.04
8.0.70.0000.00816.93
8.0.60.0040.00416.93
8.0.50.0000.00717.10
8.0.30.0090.00717.21
8.0.20.0140.01717.42
8.0.10.0000.00716.96
8.0.00.0070.01716.68
7.4.330.0000.00515.55
7.4.320.0000.00616.52
7.4.300.0000.00616.52
7.4.290.0050.00316.54
7.4.280.0040.00416.48
7.4.270.0030.00516.62
7.4.260.0000.00716.53
7.4.250.0050.00316.59
7.4.240.0080.00016.65
7.4.230.0030.00416.52
7.4.220.0110.00816.54
7.4.210.0030.01216.49
7.4.200.0030.00616.33
7.4.160.0110.00516.44
7.4.150.0150.00317.40
7.4.140.0080.01017.86
7.4.130.0100.00716.61
7.4.120.0120.00816.55
7.4.110.0030.01316.58
7.4.100.0130.00916.62
7.4.90.0120.00616.47
7.4.80.0040.01319.39
7.4.70.0140.00416.54
7.4.60.0140.00716.51
7.4.50.0080.00416.59
7.4.40.0130.00616.41
7.4.30.0110.00616.68
7.4.00.0060.01015.05
7.3.330.0020.00213.35
7.3.320.0030.00313.24
7.3.310.0030.00316.35
7.3.300.0070.00016.26
7.3.290.0050.01116.34
7.3.280.0100.00616.34
7.3.270.0120.00917.40
7.3.260.0100.00716.51
7.3.250.0100.01116.52
7.3.240.0120.00716.35
7.3.230.0030.01516.39
7.3.210.0090.00916.65
7.3.200.0190.00316.62
7.3.190.0090.00616.63
7.3.180.0100.00616.38
7.3.170.0130.00716.39
7.3.160.0060.01016.30
7.3.120.0090.00914.98
7.3.110.0130.00614.69
7.3.100.0070.00715.03
7.3.90.0110.00714.85
7.3.80.0090.00614.96
7.3.70.0120.00614.85
7.3.60.0060.00314.75
7.3.50.0030.01315.07
7.3.40.0040.01114.95
7.3.30.0030.00914.89
7.3.20.0040.01116.71
7.3.10.0080.00716.71
7.3.00.0070.00516.60
7.2.330.0110.00516.61
7.2.320.0000.01616.55
7.2.310.0140.00316.76
7.2.300.0070.01116.48
7.2.290.0070.01016.76
7.2.250.0000.02015.16
7.2.240.0070.01315.06
7.2.230.0040.01114.77
7.2.220.0070.00714.95
7.2.210.0030.01615.00
7.2.200.0060.00315.19
7.2.190.0030.01214.98
7.2.180.0060.00914.89
7.2.170.0060.00315.07
7.2.130.0120.00316.85
7.2.120.0030.00916.71
7.2.110.0110.00716.93
7.2.100.0090.00616.65
7.2.90.0090.00617.17
7.2.80.0000.01416.97
7.2.70.0030.01316.96
7.2.60.0060.00617.01
7.2.50.0080.00416.96
7.2.40.0070.00716.93
7.2.30.0060.00916.98
7.2.20.0040.01117.00
7.2.10.0030.01016.68
7.2.00.0140.00016.91
7.1.330.0100.00316.04
7.1.320.0060.00915.66
7.1.310.0030.01315.95
7.1.300.0070.00715.79
7.1.290.0100.00715.80
7.1.280.0040.00715.91
7.1.270.0070.00715.91
7.1.260.0040.00415.99
7.1.250.0100.00215.70
7.1.200.0040.01215.80
7.1.110.0090.01018.07
7.1.100.0000.01418.17
7.1.90.0000.01318.28
7.1.80.0070.01118.29
7.1.70.0090.00917.21
7.1.60.0240.01435.38
7.1.50.0160.01935.00
7.1.40.0170.01434.66
7.1.30.0180.01834.73
7.1.20.0150.01534.84
7.1.10.0100.01016.69
7.1.00.0070.00717.01
7.0.250.0030.01117.54
7.0.240.0070.00717.63
7.0.230.0030.01017.80
7.0.220.0030.01517.80
7.0.210.0070.01016.34
7.0.200.0090.00916.48
7.0.190.0050.01116.87
7.0.180.0000.01716.32
7.0.170.0030.01316.37
7.0.160.0040.01416.39
7.0.150.0000.01716.29
7.0.140.0040.00916.29
7.0.130.0050.01116.81
7.0.120.0030.01216.67
7.0.110.0060.00616.28
7.0.100.0000.01516.36
7.0.90.0070.00716.47
7.0.80.0030.01716.38
7.0.70.0080.00616.45
7.0.60.0080.01116.42
7.0.50.0060.01216.46
7.0.40.0060.01516.58
7.0.30.0110.00716.61
7.0.20.0060.01016.64
7.0.10.0030.01316.52
7.0.00.0120.00516.39

preferences:
46.77 ms | 400 KiB | 5 Q