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, $key, $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.0130.00716.63
8.3.50.0190.00316.50
8.3.40.0130.00318.67
8.3.30.0070.00718.50
8.3.20.0060.00319.02
8.3.10.0050.00321.73
8.3.00.0040.00419.48
8.2.180.0070.01116.50
8.2.170.0100.01322.96
8.2.160.0070.00720.48
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0020.00522.25
8.2.120.0000.00826.35
8.2.110.0040.00420.35
8.2.100.0100.00717.47
8.2.90.0030.00619.23
8.2.80.0030.00617.97
8.2.70.0090.00017.63
8.2.60.0040.00417.93
8.2.50.0080.00018.10
8.2.40.0040.00420.61
8.2.30.0040.00420.88
8.2.20.0000.00717.88
8.2.10.0000.00718.00
8.2.00.0000.00718.12
8.1.280.0150.00325.92
8.1.270.0080.00022.06
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.76
8.1.230.0040.00821.95
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.22
8.1.180.0030.00518.10
8.1.170.0000.00918.50
8.1.160.0070.00018.93
8.1.150.0040.00420.53
8.1.140.0100.00019.42
8.1.130.0040.00418.73
8.1.120.0000.00817.29
8.1.110.0040.00417.25
8.1.100.0040.00417.37
8.1.90.0000.00817.38
8.1.80.0030.00317.44
8.1.70.0040.00417.37
8.1.60.0040.00417.54
8.1.50.0000.00717.57
8.1.40.0040.00717.55
8.1.30.0040.00417.53
8.1.20.0030.00617.49
8.1.10.0040.00417.61
8.1.00.0030.00517.49
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0030.00318.27
8.0.270.0080.00017.18
8.0.260.0030.00316.84
8.0.250.0040.00416.96
8.0.240.0000.00716.82
8.0.230.0050.00316.95
8.0.220.0040.00416.96
8.0.210.0000.00916.88
8.0.200.0080.00316.88
8.0.190.0040.00416.88
8.0.180.0040.00416.95
8.0.170.0040.00416.96
8.0.160.0030.00516.95
8.0.150.0070.00016.72
8.0.140.0040.00416.84
8.0.130.0030.00313.24
8.0.120.0060.00316.82
8.0.110.0070.00016.67
8.0.100.0000.00716.95
8.0.90.0030.00516.73
8.0.80.0120.00416.94
8.0.70.0000.00716.79
8.0.60.0000.00716.80
8.0.50.0040.00416.92
8.0.30.0100.00917.09
8.0.20.0110.01117.40
8.0.10.0000.00816.92
8.0.00.0090.00916.64
7.4.330.0000.00515.55
7.4.320.0030.00316.30
7.4.300.0030.00316.52
7.4.290.0070.00016.47
7.4.280.0040.00416.48
7.4.270.0030.00616.63
7.4.260.0000.00513.34
7.4.250.0000.00816.61
7.4.240.0030.00316.48
7.4.230.0050.00516.61
7.4.220.0030.01916.50
7.4.210.0030.01116.64
7.4.200.0070.00016.58
7.4.160.0110.00716.55
7.4.150.0070.01017.40
7.4.140.0100.01217.86
7.4.130.0100.01016.59
7.4.120.0110.01116.56
7.4.110.0090.00916.66
7.4.100.0100.00716.56
7.4.90.0030.01316.55
7.4.80.0100.00719.39
7.4.70.0120.00316.56
7.4.60.0110.00716.64
7.4.50.0070.01016.35
7.4.40.0100.00716.49
7.4.30.0100.01416.61
7.3.330.0000.00513.19
7.3.320.0000.00513.07
7.3.310.0090.00016.16
7.3.300.0040.00416.35
7.3.290.0070.00816.33
7.3.280.0070.00916.28
7.3.270.0150.00617.40
7.3.260.0100.01016.32
7.3.250.0150.00716.51
7.3.240.0150.00616.37
7.3.230.0070.01616.50
7.3.210.0110.00616.34
7.3.200.0100.01016.37
7.3.190.0130.00816.48
7.3.180.0080.00816.22
7.3.170.0070.01116.26
7.3.160.0140.00316.29
7.2.330.0110.01116.58
7.2.320.0070.01016.62
7.2.310.0090.01216.71
7.2.300.0040.01416.29
7.2.290.0090.00616.23
7.2.60.0130.00016.69
7.2.00.0030.01319.32
7.1.100.0040.00418.00
7.1.70.0000.01317.15
7.1.60.1470.01033.39
7.1.50.1030.02032.97
7.1.40.1100.01332.49
7.1.30.1500.01032.75
7.1.20.1400.01332.48
7.1.10.0970.01014.80
7.1.00.1430.00314.67
7.0.200.1170.01714.70
7.0.190.1170.00714.59
7.0.180.0970.01014.48
7.0.170.1370.01014.51
7.0.160.1400.01014.48
7.0.150.1230.01014.29
7.0.140.1330.01014.61
7.0.130.1400.01314.71
7.0.120.1200.01014.54
7.0.110.1230.01714.34
7.0.100.1300.01014.32
7.0.90.1330.01314.31
7.0.80.1330.01014.59
7.0.70.1300.01314.32
7.0.60.1370.01014.18
7.0.50.1270.01714.34
7.0.40.1300.01714.59
7.0.30.1400.01314.64
7.0.20.1500.01314.63
7.0.10.1500.01714.48
7.0.00.1170.00714.65

preferences:
61.53 ms | 400 KiB | 5 Q