3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pkcs7_pad($str) { $len = mb_strlen($str, '8bit'); $c = 16 - ($len % 16); $str .= str_repeat(chr($c), $c); return $str; } $message = 'test'; $key = openssl_random_pseudo_bytes(32); $iv = openssl_random_pseudo_bytes(16); $cipher = mcrypt_encrypt( MCRYPT_RIJNDAEL_128, substr($key, 0, 16), $message, 'ctr', $iv ); $plain = openssl_decrypt( $cipher, 'aes-128-ctr', $key, OPENSSL_RAW_DATA, $iv ); var_dump( $message, bin2hex($cipher), $plain, mb_strlen($message, '8bit'), mb_strlen($plain, '8bit'), $message === $plain );

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.0160.00318.56
8.3.50.0130.00616.27
8.3.40.0110.00318.67
8.3.30.0150.00018.90
8.3.20.0040.00419.16
8.3.10.0000.00721.77
8.3.00.0080.00019.66
8.2.180.0100.01018.41
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00422.20
8.2.120.0070.00026.35
8.2.110.0030.00722.29
8.2.100.0060.00617.72
8.2.90.0000.00819.05
8.2.80.0050.00318.04
8.2.70.0000.00817.63
8.2.60.0000.00817.90
8.2.50.0000.00818.10
8.2.40.0040.00420.59
8.2.30.0080.00021.09
8.2.20.0040.00417.81
8.2.10.0060.00318.09
8.2.00.0040.00417.94
8.1.280.0070.01025.92
8.1.270.0080.00022.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00920.96
8.1.230.0070.00419.29
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0060.00317.36
8.1.190.0030.00617.10
8.1.180.0060.00318.10
8.1.170.0060.00318.57
8.1.160.0040.00419.00
8.1.150.0000.00720.67
8.1.140.0000.00819.57
8.1.130.0080.00318.87
8.1.120.0000.00717.50
8.1.110.0000.00817.45
8.1.100.0040.00417.41
8.1.90.0060.00317.43
8.1.80.0000.00717.39
8.1.70.0030.00317.23
8.1.60.0080.00017.56
8.1.50.0060.00317.39
8.1.40.0090.00317.40
8.1.30.0040.00417.72
8.1.20.0080.00017.60
8.1.10.0000.00817.63
8.1.00.0000.00717.56
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0070.00018.45
8.0.270.0030.00617.20
8.0.260.0040.00416.70
8.0.250.0000.00716.97
8.0.240.0020.00517.00
8.0.230.0030.00316.89
8.0.220.0000.00716.80
8.0.210.0050.00316.86
8.0.200.0080.00016.91
8.0.190.0070.00316.98
8.0.180.0000.00816.96
8.0.170.0030.00516.86
8.0.160.0040.00416.93
8.0.150.0030.00316.84
8.0.140.0030.00316.84
8.0.130.0030.00313.25
8.0.120.0020.00516.89
8.0.110.0000.00816.75
8.0.100.0000.00716.77
8.0.90.0000.00716.86
8.0.80.0110.00716.89
8.0.70.0050.00316.91
8.0.60.0000.00916.95
8.0.50.0040.00416.81
8.0.30.0110.00817.13
8.0.20.0140.00617.40
8.0.10.0040.00416.91
8.0.00.0060.01216.66
7.4.330.0030.00315.55
7.4.320.0030.00316.50
7.4.300.0030.00316.64
7.4.290.0000.00716.48
7.4.280.0050.00516.63
7.4.270.0040.00416.62
7.4.260.0030.00313.27
7.4.250.0070.00016.47
7.4.240.0000.00716.52
7.4.230.0030.00316.26
7.4.220.0000.01816.47
7.4.210.0140.00416.49
7.4.200.0030.00516.70
7.4.160.0090.00616.63
7.4.150.0060.01317.40
7.4.140.0060.01317.86
7.4.130.0040.01616.54
7.4.120.0070.01116.56
7.4.110.0130.00716.35
7.4.100.0100.00716.43
7.4.90.0100.00716.48
7.4.80.0100.00619.39
7.4.70.0110.00616.48
7.4.60.0030.01316.55
7.4.50.0100.00716.40
7.4.40.0130.00316.26
7.4.30.0060.01016.49
7.4.00.0090.00614.60
7.3.330.0000.00513.28
7.3.320.0000.00513.12
7.3.310.0030.00616.31
7.3.300.0050.00216.38
7.3.290.0100.00716.30
7.3.280.0090.00716.28
7.3.270.0100.00717.40
7.3.260.0120.00716.26
7.3.250.0120.00616.43
7.3.240.0070.00916.46
7.3.230.0130.01016.49
7.3.210.0140.00416.52
7.3.200.0130.00316.44
7.3.190.0120.01216.42
7.3.180.0120.00616.59
7.3.170.0040.01816.25
7.3.160.0120.00416.44
7.3.10.0100.00616.64
7.3.00.0000.01516.61
7.2.330.0090.00916.33
7.2.320.0090.00816.59
7.2.310.0090.00916.66
7.2.300.0120.00416.48
7.2.290.0130.00316.41
7.2.130.0070.01016.56
7.2.120.0040.01216.61
7.2.110.0140.00016.64
7.2.100.0000.01316.66
7.2.90.0000.01816.90
7.2.80.0080.00816.72
7.2.70.0070.00716.83
7.2.60.0080.00416.66
7.2.50.0090.00916.81
7.2.40.0070.00716.85
7.2.30.0090.00616.90
7.2.20.0070.00416.75
7.2.10.0070.01116.81
7.2.00.0080.00718.06
7.1.250.0040.01115.36
7.1.100.0080.00318.36
7.1.70.0000.01017.33
7.1.60.1970.01733.50
7.1.50.2070.01332.74
7.1.40.2000.02032.75
7.1.30.2800.01332.43
7.1.20.1830.01032.95
7.1.10.0070.01014.92
7.1.00.0070.01314.66
7.0.200.2030.01014.89
7.0.190.2700.01014.81
7.0.180.1500.01014.52
7.0.170.2500.01314.11
7.0.160.2170.01014.14
7.0.150.1630.01314.30
7.0.140.0130.01314.22
7.0.130.0130.00714.84
7.0.120.1400.00014.48
7.0.110.1700.01014.52
7.0.100.0670.01314.61
7.0.90.2330.01014.53
7.0.80.0030.01314.60
7.0.70.1770.01014.38
7.0.60.0030.01314.41
7.0.50.0670.01714.62
7.0.40.0200.01014.63
7.0.30.1100.01314.48
7.0.20.1370.01314.43
7.0.10.1600.00714.63
7.0.00.1270.00314.49

preferences:
48.09 ms | 401 KiB | 5 Q