3v4l.org

run code in 300+ PHP versions simultaneously
<?php function benchmarkMemory(callable $function, $args=null) { $memory = memory_get_peak_usage(); $result = is_array($args)? call_user_func_array($function, $args): call_user_func_array($function); return [ 'memory' => memory_get_peak_usage() - $memory ]; } var_dump(benchmarkMemory('str_repeat', ['test',1E4])); gc_collect_cycles(); var_dump(benchmarkMemory('str_repeat', ['test',1E3]));

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.120.0160.00320.80
8.3.110.0000.00820.94
8.3.100.0030.01216.71
8.3.90.0050.00326.77
8.3.80.0110.00018.43
8.3.70.0040.01118.56
8.3.60.0110.00418.31
8.3.50.0120.01121.21
8.3.40.0120.00618.84
8.3.30.0070.00720.25
8.3.20.0030.00620.44
8.3.10.0040.00421.09
8.3.00.0040.00423.53
8.2.240.0090.00018.86
8.2.230.0090.00622.58
8.2.220.0040.01237.54
8.2.210.0090.00026.77
8.2.200.0060.00316.75
8.2.190.0120.00616.88
8.2.180.0090.01216.50
8.2.170.0070.00722.96
8.2.160.0080.00620.39
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.27
8.2.110.0090.00020.35
8.2.100.0060.00617.73
8.2.90.0040.00417.38
8.2.80.0080.00018.61
8.2.70.0030.00717.63
8.2.60.0030.00517.50
8.2.50.0050.00317.55
8.2.40.0000.00818.16
8.2.30.0070.00019.59
8.2.20.0000.00817.69
8.2.10.0030.00517.77
8.2.00.0020.00517.61
8.1.300.0070.00718.52
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0050.00224.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0190.00323.76
8.1.230.0040.00718.95
8.1.220.0000.00818.56
8.1.210.0060.00318.77
8.1.200.0040.00417.25
8.1.190.0000.00817.53
8.1.180.0030.00618.10
8.1.170.0000.00918.51
8.1.160.0000.00718.84
8.1.150.0000.00818.53
8.1.140.0060.00317.43
8.1.130.0040.00417.96
8.1.120.0000.00717.45
8.1.110.0070.00017.45
8.1.100.0040.00417.49
8.1.90.0040.00417.46
8.1.80.0070.00017.45
8.1.70.0000.00717.46
8.1.60.0030.00617.68
8.1.50.0050.00317.58
8.1.40.0060.00317.61
8.1.30.0050.00217.63
8.1.20.0040.00417.68
8.1.10.0030.00517.57
8.1.00.0020.00517.50
8.0.300.0080.00018.77
8.0.290.0080.00016.58
8.0.280.0000.00718.37
8.0.270.0040.00416.78
8.0.260.0000.00616.73
8.0.250.0050.00217.03
8.0.240.0000.00716.91
8.0.230.0030.00316.99
8.0.220.0000.00716.88
8.0.210.0000.00716.90
8.0.200.0060.00017.00
8.0.190.0030.00516.96
8.0.180.0000.00716.86
8.0.170.0000.00716.83
8.0.160.0040.00417.03
8.0.150.0030.00516.89
8.0.140.0040.00416.80
8.0.130.0030.00313.30
8.0.120.0050.00216.94
8.0.110.0040.00416.91
8.0.100.0000.00816.90
8.0.90.0050.00216.72
8.0.80.0090.00916.95
8.0.70.0040.00416.80
8.0.60.0040.00416.81
8.0.50.0040.00417.05
8.0.30.0080.01116.96
8.0.20.0140.01717.40
8.0.10.0070.00017.13
8.0.00.0140.00916.92
7.4.330.0020.00216.89
7.4.320.0000.00616.44
7.4.300.0040.00416.54
7.4.290.0030.00316.65
7.4.280.0080.00016.62
7.4.270.0080.00016.66
7.4.260.0000.00716.64
7.4.250.0030.00516.58
7.4.240.0030.00316.67
7.4.230.0030.00316.55
7.4.220.0200.00616.71
7.4.210.0080.00716.63
7.4.200.0030.00516.60
7.4.190.0000.00716.52
7.4.160.0150.00016.44
7.4.150.0150.00617.40
7.4.140.0100.00717.86
7.4.130.0070.01016.48
7.4.120.0100.00916.61
7.4.110.0090.00916.63
7.4.100.0090.00916.51
7.4.90.0120.00616.33
7.4.80.0110.01019.39
7.4.70.0060.00916.39
7.4.60.0100.01416.67
7.4.50.0040.00416.39
7.4.40.0080.00822.77
7.4.30.0030.01316.29
7.4.00.0070.01014.64
7.3.330.0030.00313.21
7.3.320.0050.00013.16
7.3.310.0040.00416.21
7.3.300.0040.00416.26
7.3.290.0030.01216.34
7.3.280.0110.00716.36
7.3.270.0100.00617.40
7.3.260.0100.00918.24
7.3.250.0150.00616.51
7.3.240.0060.01016.43
7.3.230.0030.01716.53
7.3.210.0100.00716.41
7.3.200.0070.01019.39
7.3.190.0140.00616.61
7.3.180.0040.01116.52
7.3.170.0060.00916.54
7.3.160.0040.01216.38
7.3.120.0060.00914.84
7.2.330.0110.00616.77
7.2.320.0060.01216.68
7.2.310.0090.01216.37
7.2.300.0060.01016.50
7.2.290.0060.01316.71
7.2.60.0040.00816.95
7.1.200.0130.00015.49
7.1.70.0000.00717.16
7.1.60.0140.01019.17
7.1.50.0130.01016.85
7.1.00.0030.06322.26
7.0.200.0080.00816.76
7.0.140.0030.07322.00
7.0.60.0170.08019.99
7.0.50.0100.04317.89
7.0.40.0100.04717.73
7.0.30.0070.05017.75
7.0.20.0070.05317.82
7.0.10.0170.05717.73
7.0.00.0100.07317.74
5.6.280.0100.06321.14
5.6.210.0030.06020.63
5.6.200.0070.08718.19
5.6.190.0130.07318.25
5.6.180.0030.08318.16
5.6.170.0130.06018.29
5.6.160.0130.07318.14
5.6.150.0100.07018.17
5.6.140.0170.06718.18
5.6.130.0070.04018.28
5.6.120.0130.06018.21
5.6.110.0070.04018.18
5.6.100.0070.05718.13
5.6.90.0170.07018.23
5.6.80.0070.04017.57
5.6.70.0030.08017.56
5.6.60.0100.06017.55
5.6.50.0030.04717.57
5.6.40.0000.05017.54
5.6.30.0070.07717.52
5.6.20.0100.06717.51
5.6.10.0070.07717.53
5.6.00.0170.07317.60
5.5.350.4030.04720.36
5.5.340.0100.08017.98
5.5.330.0130.07018.02
5.5.320.0070.07718.09
5.5.310.0070.07317.94
5.5.300.0100.05318.02
5.5.290.0100.04017.98
5.5.280.0070.05317.96
5.5.270.0100.08717.97
5.5.260.0170.07018.08
5.5.250.0030.05317.79
5.5.240.0100.04317.39
5.5.230.0000.06317.37
5.5.220.0070.06017.31
5.5.210.0070.06717.30
5.5.200.0000.05717.31
5.5.190.0070.06017.37
5.5.180.0070.07717.43
5.5.160.0100.07017.34
5.5.150.0030.07717.38
5.5.140.0030.06717.44
5.5.130.0200.05017.41
5.5.120.0030.05317.25
5.5.110.0000.04317.32
5.5.100.0130.06317.25
5.5.90.0000.07317.26
5.5.80.0070.06717.23
5.5.70.0070.07717.23
5.5.60.0030.07717.19
5.5.50.0100.06717.23
5.5.40.0100.07017.31
5.5.30.0070.07317.26
5.5.20.0070.04017.19
5.5.10.0030.04017.25
5.5.00.0000.08317.18
5.4.450.0000.08719.43
5.4.440.0070.04019.30
5.4.430.0100.05019.46
5.4.420.0070.06319.31
5.4.410.0100.04719.23
5.4.400.0030.08319.10
5.4.390.0100.07719.02
5.4.380.0070.07719.14
5.4.370.0030.05719.03
5.4.360.0030.07719.14
5.4.350.0000.04318.88
5.4.340.0000.08319.04
5.4.320.0000.04319.03
5.4.310.0070.07718.89
5.4.300.0100.06319.12
5.4.290.0100.06019.04
5.4.280.0100.06718.98
5.4.270.0070.07719.00
5.4.260.0100.07019.09
5.4.250.0030.05019.11
5.4.240.0130.06318.94
5.4.230.0130.05319.11
5.4.220.0030.08019.11
5.4.210.0100.07319.21
5.4.200.0070.06019.09
5.4.190.0000.06019.02
5.4.180.0130.06018.94
5.4.170.0000.08319.13
5.4.160.0070.08018.86
5.4.150.0070.04319.11
5.4.140.0030.07316.38
5.4.130.0070.04016.34
5.4.120.0100.06716.48
5.4.110.0130.06716.47
5.4.100.0030.07316.48
5.4.90.0030.07716.35
5.4.80.0100.07316.53
5.4.70.0030.07316.39
5.4.60.0100.07316.35
5.4.50.0130.03316.27
5.4.40.0070.07016.38
5.4.30.0000.04716.43
5.4.20.0100.07016.52
5.4.10.0070.07716.51
5.4.00.0000.05316.12
5.3.290.0070.07314.70
5.3.280.0030.08014.63
5.3.270.0170.06314.64
5.3.260.0070.07314.57
5.3.250.0070.07314.57
5.3.240.0070.05014.65
5.3.230.0100.07714.65
5.3.220.0030.05714.54
5.3.210.0170.04714.61
5.3.200.0030.05314.56
5.3.190.0200.06714.55
5.3.180.0000.07714.63
5.3.170.0100.07014.77
5.3.160.0030.04314.57
5.3.150.0070.08714.60
5.3.140.0070.07314.63
5.3.130.0000.04314.50
5.3.120.0070.03714.57
5.3.110.0070.08014.57
5.3.100.0070.07313.90
5.3.90.0070.06314.06
5.3.80.0030.06314.04
5.3.70.0070.06314.07
5.3.60.0070.06014.00
5.3.50.0100.05713.95
5.3.40.0100.07013.80
5.3.30.0100.07313.95
5.3.20.0000.06013.75
5.3.10.0070.04013.70
5.3.00.0000.08313.52
5.2.170.0100.05311.19
5.2.160.0030.05011.00
5.2.150.0030.06711.16
5.2.140.0030.05311.19
5.2.130.0000.07011.13
5.2.120.0030.05011.15
5.2.110.0070.06311.11
5.2.100.0130.05011.10
5.2.90.0030.06311.10
5.2.80.0070.06311.07
5.2.70.0000.07010.98
5.2.60.0070.05711.25
5.2.50.0000.03310.95
5.2.40.0070.06011.05
5.2.30.0070.06010.98
5.2.20.0030.06310.94
5.2.10.0070.03710.76
5.2.00.0030.06310.77
5.1.60.0030.0509.97
5.1.50.0030.03010.05
5.1.40.0000.0279.95
5.1.30.0070.04710.40
5.1.20.0070.03010.38
5.1.10.0030.06010.29
5.1.00.0070.0239.91
5.0.50.0000.0378.52
5.0.40.0100.0378.26
5.0.30.0030.0408.21
5.0.20.0070.0438.25
5.0.10.0070.0238.38
5.0.00.0000.0578.10
4.4.90.0000.0277.62
4.4.80.0030.0207.62
4.4.70.0070.0207.62
4.4.60.0000.0407.62
4.4.50.0070.0337.62
4.4.40.0000.0277.62
4.4.30.0000.0177.62
4.4.20.0000.0377.62
4.4.10.0000.0207.62
4.4.00.0000.0577.62
4.3.110.0000.0237.62
4.3.100.0000.0337.62
4.3.90.0000.0277.62
4.3.80.0070.0377.62
4.3.70.0030.0307.62
4.3.60.0000.0377.62
4.3.50.0000.0277.62
4.3.40.0030.0507.62
4.3.30.0000.0377.62
4.3.20.0000.0277.62
4.3.10.0000.0377.62
4.3.00.0000.0377.62

preferences:
67.56 ms | 403 KiB | 5 Q