3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($str) { test2($str); } function test2($str) { test3($str); } function test3($str) { echo "before: ".round(memory_get_usage()/1024/1024, 2)." MB\n"; debug_backtrace(false); echo "after: ".round(memory_get_usage()/1024/1024, 2)." MB\n"; } test(str_repeat('a', 10000000));

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)
7.4.10.0130.01324.32
7.4.00.0130.01324.08
7.3.130.0030.02324.24
7.3.120.0100.01324.11
7.3.110.0210.00724.48
7.3.100.0150.00324.02
7.3.90.0130.01023.93
7.3.80.0110.00424.23
7.3.70.0070.01423.98
7.3.60.0060.01524.10
7.3.50.0100.01024.10
7.3.40.0080.01224.38
7.3.30.0090.00924.33
7.3.20.0070.00726.17
7.3.10.0100.00925.72
7.3.00.0090.00625.86
7.2.260.0170.01024.48
7.2.250.0180.00724.39
7.2.240.0100.01024.26
7.2.230.0170.00324.43
7.2.220.0070.01324.51
7.2.210.0060.00924.00
7.2.200.0090.00924.18
7.2.190.0150.00424.41
7.2.180.0060.01024.16
7.2.170.0070.01724.40
7.2.160.0110.00724.18
7.2.150.0070.01126.12
7.2.140.0080.00826.27
7.2.130.0180.00726.00
7.2.120.0120.00825.99
7.2.110.0160.00725.99
7.2.100.0120.00725.82
7.2.90.0060.01125.98
7.2.80.0150.01126.27
7.2.70.0110.00925.90
7.2.60.0220.00326.03
7.2.50.0160.00525.98
7.2.40.0150.00926.10
7.2.30.0180.01026.08
7.2.20.0140.01225.96
7.2.10.0150.00826.11
7.2.00.0140.00826.85
7.1.330.0090.00925.44
7.1.320.0060.00925.15
7.1.310.0000.01125.15
7.1.300.0000.01825.19
7.1.290.0030.01524.98
7.1.280.0030.01025.20
7.1.270.0110.00425.23
7.1.260.0070.00725.29
7.1.250.0120.00825.14
7.1.240.0040.00825.00
7.1.230.0070.00724.98
7.1.220.0030.01325.14
7.1.210.0060.01025.29
7.1.200.0000.01725.25
7.1.190.0070.01025.19
7.1.180.0030.01325.14
7.1.170.0060.00925.05
7.1.160.0100.00725.11
7.1.150.0110.01125.14
7.1.140.0060.01025.30
7.1.130.0090.00625.07
7.1.120.0060.00625.11
7.1.110.0100.00325.28
7.1.100.0040.01225.14
7.1.90.0000.01725.10
7.1.80.0070.00724.98
7.1.70.0110.00225.67
7.1.60.0060.01525.99
7.1.50.0050.01525.83
7.1.40.0030.01324.99
7.1.30.0070.00725.24
7.1.20.0030.01325.11
7.1.10.0040.01125.04
7.1.00.0020.03228.56
7.0.330.0040.01124.73
7.0.320.0070.01024.79
7.0.310.0100.00324.99
7.0.300.0060.00924.83
7.0.290.0000.01824.63
7.0.280.0040.00824.80
7.0.270.0060.00924.93
7.0.260.0080.00424.76
7.0.250.0060.00624.89
7.0.240.0070.00424.98
7.0.230.0040.01124.94
7.0.220.0040.01424.82
7.0.210.0040.01224.77
7.0.200.0660.00524.53
7.0.190.0060.00624.70
7.0.180.0060.00624.93
7.0.170.0080.00824.82
7.0.160.0070.00324.96
7.0.150.0000.01124.79
7.0.140.0050.04428.10
7.0.130.0030.01324.80
7.0.120.0100.00324.95
7.0.110.0160.00024.70
7.0.100.0070.00724.81
7.0.90.0040.01125.01
7.0.80.0030.01024.86
7.0.70.0200.04728.09
7.0.60.0150.04027.97
7.0.50.0170.04228.31
7.0.40.0120.04426.23
7.0.30.0130.03526.33
7.0.20.0090.04126.09
7.0.10.0150.04326.23
7.0.00.0150.04526.20
5.6.400.0240.01451.96
5.6.390.0260.01352.58
5.6.380.0210.01752.77
5.6.370.0300.01052.34
5.6.360.0130.02052.37
5.6.350.0260.01752.59
5.6.340.0170.01752.62
5.6.330.0210.02152.65
5.6.320.0190.01952.23
5.6.310.0250.01252.35
5.6.300.0280.01152.70
5.6.290.0330.00752.21
5.6.280.0210.04255.65
5.6.270.0230.01752.53
5.6.260.0330.00752.25
5.6.250.0270.01452.65
5.6.240.0230.01352.36
5.6.230.0290.01352.25
5.6.220.0240.05155.54
5.6.210.0230.05255.54
5.6.200.0150.04755.80
5.6.190.0210.05055.72
5.6.180.0220.05255.85
5.6.170.0180.05355.69
5.6.160.0200.05855.64
5.6.150.0170.03755.81
5.6.140.0310.02055.82
5.6.130.0190.03255.84
5.6.120.0200.04355.87
5.6.110.0200.05655.84
5.6.100.0210.05855.64
5.6.90.0280.05255.88
5.6.80.0220.05455.46
5.6.70.0200.04255.27
5.6.60.0150.05855.46
5.6.50.0270.02855.38
5.6.40.0280.04555.40
5.6.30.0200.05155.43
5.6.20.0280.04355.31
5.6.10.0150.06255.32
5.6.00.0210.05155.31
5.5.380.0140.02452.48
5.5.370.0160.02352.23
5.5.360.0180.05655.44
5.5.350.0210.05855.41
5.5.340.0270.05055.67
5.5.330.0320.03855.73
5.5.320.0240.04455.62
5.5.310.0140.04455.81
5.5.300.0200.04355.55
5.5.290.0250.05755.66
5.5.280.0350.05755.50
5.5.270.0220.05755.83
5.5.260.0320.04355.76
5.5.250.0230.05355.57
5.5.240.0220.03855.37
5.5.230.0240.03755.25
5.5.220.0260.03255.38
5.5.210.0230.03655.25
5.5.200.0240.04655.23
5.5.190.0340.02955.21
5.5.180.0220.03855.36
5.5.170.0200.02052.14
5.5.160.0260.04555.37
5.5.150.0300.04355.32
5.5.140.0250.04755.30
5.5.130.0240.05155.19
5.5.120.0260.03755.19
5.5.110.0170.05755.17
5.5.100.0200.05555.17
5.5.90.0270.04555.25
5.5.80.0190.03755.23
5.5.70.0180.04855.29
5.5.60.0250.03555.10
5.5.50.0180.04655.12
5.5.40.0230.03555.24
5.5.30.0170.03755.30
5.5.20.0310.03355.17
5.5.10.0150.04655.34
5.5.00.0300.05055.25
5.4.450.0300.04653.41
5.4.440.0180.05353.11
5.4.430.0230.04653.26
5.4.420.0230.05553.21
5.4.410.0170.05653.36
5.4.400.0180.03353.15
5.4.390.0200.03853.14
5.4.380.0240.04953.13
5.4.370.0230.02853.07
5.4.360.0230.03053.08
5.4.350.0200.04853.07
5.4.340.0210.05253.19
5.4.330.0100.02049.16
5.4.320.0250.02853.07
5.4.310.0160.02953.10
5.4.300.0170.05753.12
5.4.290.0160.03953.13
5.4.280.0200.05252.98
5.4.270.0180.05853.13
5.4.260.0250.04553.05
5.4.250.0180.03752.86
5.4.240.0180.04252.92
5.4.230.0240.04853.00
5.4.220.0170.04353.07
5.4.210.0240.04553.03
5.4.200.0240.05052.88
5.4.190.0250.04852.99
5.4.180.0150.06253.01
5.4.170.0290.04553.06
5.4.160.0250.02852.82
5.4.150.0170.04753.04
5.4.140.0110.03551.64
5.4.130.0240.04151.70
5.4.120.0180.03051.74
5.4.110.0280.04551.87
5.4.100.0270.03851.69
5.4.90.0200.05251.72
5.4.80.0230.05251.75
5.4.70.0330.04251.77
5.4.60.0190.05151.55
5.4.50.0320.02551.71
5.4.40.0230.03851.79
5.4.30.0270.03751.59
5.4.20.0150.03551.65
5.4.10.0170.05751.79
5.4.00.0220.04951.37
5.3.290.0150.03150.65
5.3.280.0260.03450.50
5.3.270.0280.04750.51
5.3.260.0150.03150.54
5.3.250.0220.04750.53
5.3.240.0200.04050.40
5.3.230.0250.02350.36
5.3.220.0150.05350.45
5.3.210.0250.05350.48
5.3.200.0170.04750.48
5.3.190.0200.04050.48
5.3.180.0220.04750.60
5.3.170.0210.03350.52
5.3.160.0220.05050.59
5.3.150.0200.04850.57
5.3.140.0290.04950.57
5.3.130.0250.02850.57
5.3.120.0230.02850.51
5.3.110.0150.03350.50
5.3.100.0320.04250.28
5.3.90.0210.04750.25
5.3.80.0150.03550.15
5.3.70.0120.05050.06
5.3.60.0130.05350.20
5.3.50.0210.04450.06
5.3.40.0170.04049.95
5.3.30.0250.02050.14
5.3.20.0250.04849.95
5.3.10.0180.05149.91
5.3.00.0140.04649.89
5.2.170.0070.07749.22
5.2.160.0130.07749.01
5.2.150.0100.04049.14
5.2.140.0270.06749.14
5.2.130.0170.07749.02
5.2.120.0170.06049.10
5.2.110.0230.07049.10
5.2.100.0200.07348.96
5.2.90.0300.04748.96
5.2.80.0200.07349.09
5.2.70.0170.07049.10
5.2.60.0170.03749.16
5.2.50.0300.07348.98
5.2.40.0030.03320.32
5.2.30.0070.03020.20
5.2.20.0100.05720.39
5.2.10.0070.03320.17
5.2.00.0070.02720.06
5.1.60.0070.02719.29
5.1.50.0030.03719.16
5.1.40.0030.03019.32
5.1.30.0030.03319.70
5.1.20.0130.01719.80
5.1.10.0070.02319.23
5.1.00.0070.02319.42
5.0.50.0000.02717.68
5.0.40.0000.02317.55
5.0.30.0100.04317.45
5.0.20.0030.02317.42
5.0.10.0070.01717.35
5.0.00.0100.05317.34
4.4.90.0100.02715.09
4.4.80.0000.02015.12
4.4.70.0100.03315.09
4.4.60.0030.02715.09
4.4.50.0070.02015.17
4.4.40.0070.02015.07
4.4.30.0000.02315.08
4.4.20.0100.01315.25
4.4.10.0030.01715.23
4.4.00.0030.03015.11
4.3.110.0070.01315.03
4.3.100.0070.03015.09
4.3.90.0100.01015.07
4.3.80.0130.05015.00
4.3.70.0030.01714.97
4.3.60.0030.02014.99
4.3.50.0070.01314.99
4.3.40.0030.02315.06
4.3.30.0070.01313.86
4.3.20.0030.01713.96
4.3.10.0030.01713.82
4.3.00.0030.01713.89

preferences:
38.79 ms | 400 KiB | 5 Q