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"; $t = microtime(true); debug_backtrace(false); echo "time: ".(microtime(true)-$t)." ms\n"; 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.0200.00724.37
7.4.00.0090.01224.52
7.3.130.0170.00724.18
7.3.120.0170.00724.38
7.3.110.0150.00824.17
7.3.100.0120.00724.04
7.3.90.0120.00924.21
7.3.80.0100.00724.27
7.3.70.0090.01224.15
7.3.60.0150.00524.18
7.3.50.0100.01124.18
7.3.40.0140.00824.21
7.3.30.0140.00524.20
7.3.20.0070.01226.05
7.3.10.0060.00925.92
7.3.00.0060.01025.80
7.2.260.0170.01024.22
7.2.250.0140.01424.62
7.2.240.0160.00724.30
7.2.230.0100.01224.28
7.2.220.0140.00624.51
7.2.210.0120.00824.19
7.2.200.0130.01324.26
7.2.190.0120.01224.40
7.2.180.0100.01324.15
7.2.170.0110.00824.26
7.2.160.0120.00724.19
7.2.150.0130.00826.26
7.2.140.0110.00826.17
7.2.130.0080.01126.06
7.2.120.0100.00826.06
7.2.110.0110.00826.10
7.2.100.0100.00926.20
7.2.90.0150.00326.38
7.2.80.0100.01026.22
7.2.70.0080.01026.16
7.2.60.0050.01226.23
7.2.50.0050.01226.04
7.2.40.0130.00726.30
7.2.30.0130.00926.31
7.2.20.0100.00726.23
7.2.10.0120.00526.17
7.2.00.0120.00827.04
7.1.330.0090.01125.08
7.1.320.0100.01025.27
7.1.310.0070.01525.29
7.1.300.0150.00525.20
7.1.290.0060.01225.07
7.1.280.0070.01125.10
7.1.270.0040.01424.98
7.1.260.0110.00525.02
7.1.250.0120.00425.18
7.1.240.0090.00925.17
7.1.230.0040.00725.37
7.1.220.0070.00825.27
7.1.210.0030.01425.23
7.1.200.0110.00025.04
7.1.190.0030.01325.21
7.1.180.0030.01224.90
7.1.170.0070.00325.25
7.1.160.0070.01025.02
7.1.150.0070.00725.35
7.1.140.0060.00924.96
7.1.130.0000.01425.20
7.1.120.0000.01125.18
7.1.110.0090.00925.29
7.1.100.0070.00724.80
7.1.90.0100.00325.39
7.1.80.0060.00925.33
7.1.70.0050.00725.89
7.1.60.0120.01325.89
7.1.50.0080.01125.72
7.1.40.0070.01425.17
7.1.30.0130.00325.25
7.1.20.0130.00324.84
7.1.10.0200.00025.16
7.1.00.0020.05328.42
7.0.330.0070.01024.96
7.0.320.0070.01024.81
7.0.310.0040.00824.79
7.0.300.0070.00724.81
7.0.290.0100.00324.79
7.0.280.0130.00324.79
7.0.270.0030.01325.00
7.0.260.0080.00424.93
7.0.250.0100.00324.89
7.0.240.0060.00924.86
7.0.230.0000.01325.05
7.0.220.0060.00924.98
7.0.210.0060.00625.02
7.0.200.0180.00325.46
7.0.190.0070.01124.73
7.0.180.0080.00824.84
7.0.170.0040.00724.84
7.0.160.0040.01524.76
7.0.150.0070.01124.92
7.0.140.0050.04428.29
7.0.130.0100.00024.78
7.0.120.0070.01124.86
7.0.110.0030.01024.93
7.0.100.0460.03527.07
7.0.90.0100.02127.03
7.0.80.0110.02027.19
7.0.70.0120.04227.15
7.0.60.0100.04727.14
7.0.50.0570.03927.37
7.0.40.0480.04626.22
7.0.30.0500.04426.22
7.0.20.0390.04126.17
7.0.10.0500.04026.37
7.0.00.0450.04826.20
5.6.400.0230.01352.56
5.6.390.0290.01052.54
5.6.380.0300.01352.52
5.6.370.0240.01752.49
5.6.360.0250.01852.48
5.6.350.0230.01352.48
5.6.340.0190.01952.29
5.6.330.0320.01052.43
5.6.320.0140.02452.49
5.6.310.0300.01352.16
5.6.300.0300.01352.72
5.6.290.0260.01052.51
5.6.280.0190.04355.71
5.6.270.0170.02052.40
5.6.260.0160.02352.74
5.6.250.0190.03155.75
5.6.240.0270.04255.73
5.6.230.0250.02555.64
5.6.220.0210.03155.69
5.6.210.0210.04155.66
5.6.200.0210.03855.86
5.6.190.0240.04655.69
5.6.180.0140.04155.82
5.6.170.0210.03655.91
5.6.160.0250.05055.72
5.6.150.0220.04555.69
5.6.140.0200.03755.70
5.6.130.0180.05155.96
5.6.120.0210.05555.67
5.6.110.0240.04255.94
5.6.100.0240.05155.74
5.6.90.0130.05855.75
5.6.80.0230.04555.48
5.6.70.0270.05055.51
5.6.60.0160.05455.48
5.6.50.0350.04255.39
5.6.40.0160.05555.47
5.6.30.0320.04355.47
5.6.20.0270.04855.45
5.6.10.0250.05255.59
5.6.00.0230.04755.49
5.5.380.0190.03455.61
5.5.370.0180.03655.50
5.5.360.0230.04555.34
5.5.350.0210.04455.31
5.5.340.0250.04955.60
5.5.330.0150.05555.57
5.5.320.0180.05255.70
5.5.310.0170.06055.62
5.5.300.0230.05355.71
5.5.290.0210.05855.77
5.5.280.0250.04555.76
5.5.270.0210.05155.70
5.5.260.0250.06255.54
5.5.250.0300.04855.47
5.5.240.0190.05455.38
5.5.230.0260.05255.33
5.5.220.0240.05355.44
5.5.210.0260.04855.41
5.5.200.0240.05455.35
5.5.190.0230.04855.26
5.5.180.0240.05055.40
5.5.170.0250.01652.23
5.5.160.0250.04255.36
5.5.150.0260.05355.39
5.5.140.0250.04255.24
5.5.130.0220.05055.29
5.5.120.0250.04555.10
5.5.110.0200.05255.41
5.5.100.0200.04755.14
5.5.90.0250.04355.30
5.5.80.0280.04855.27
5.5.70.0280.04255.29
5.5.60.0180.05555.21
5.5.50.0170.05955.27
5.5.40.0200.05455.33
5.5.30.0260.04655.21
5.5.20.0260.03555.28
5.5.10.0270.04355.23
5.5.00.0210.05155.34
5.4.450.0320.04253.24
5.4.440.0250.04753.38
5.4.430.0170.05053.20
5.4.420.0310.04353.22
5.4.410.0200.05353.30
5.4.400.0320.04353.08
5.4.390.0170.05553.18
5.4.380.0280.04553.31
5.4.370.0200.05553.07
5.4.360.0210.05053.05
5.4.350.0230.03853.23
5.4.340.0190.05653.04
5.4.330.0210.00949.12
5.4.320.0200.05553.15
5.4.310.0180.05853.10
5.4.300.0190.04452.95
5.4.290.0230.05052.96
5.4.280.0200.05053.24
5.4.270.0220.05053.29
5.4.260.0220.05053.32
5.4.250.0220.04553.10
5.4.240.0250.04753.02
5.4.230.0210.04853.00
5.4.220.0220.04453.11
5.4.210.0190.05253.08
5.4.200.0210.05353.04
5.4.190.0220.04753.15
5.4.180.0260.04253.11
5.4.170.0170.05053.12
5.4.160.0270.04253.11
5.4.150.0170.05253.18
5.4.140.0260.04651.62
5.4.130.0270.04551.84
5.4.120.0270.04751.88
5.4.110.0260.04851.82
5.4.100.0170.03751.84
5.4.90.0190.04951.85
5.4.80.0260.04951.97
5.4.70.0230.04651.99
5.4.60.0230.04751.74
5.4.50.0230.04651.93
5.4.40.0150.05851.90
5.4.30.0230.05351.82
5.4.20.0180.05351.82
5.4.10.0290.03551.91
5.4.00.0170.05151.52
5.3.290.0260.04850.78
5.3.280.0230.05050.41
5.3.270.0190.05650.56
5.3.260.0270.04850.58
5.3.250.0190.04950.59
5.3.240.0170.05150.61
5.3.230.0300.04550.54
5.3.220.0130.05350.52
5.3.210.0290.04050.50
5.3.200.0200.05550.55
5.3.190.0260.04350.55
5.3.180.0240.04550.43
5.3.170.0200.04850.63
5.3.160.0220.04350.61
5.3.150.0320.04550.54
5.3.140.0150.04150.43
5.3.130.0270.04250.42
5.3.120.0200.05350.55
5.3.110.0290.04750.54
5.3.100.0260.04850.28
5.3.90.0250.04650.39
5.3.80.0150.04750.06
5.3.70.0230.04850.25
5.3.60.0230.05050.24
5.3.50.0300.04250.23
5.3.40.0170.03850.19
5.3.30.0290.03950.15
5.3.20.0270.04550.05
5.3.10.0200.05049.95
5.3.00.0260.04449.91
5.2.170.0200.07349.08
5.2.160.0230.07749.10
5.2.150.0170.07749.08
5.2.140.0270.06349.08
5.2.130.0230.06749.20
5.2.120.0130.05349.08
5.2.110.0170.05349.07
5.2.100.0170.07049.04
5.2.90.0170.05349.07
5.2.80.0170.07349.16
5.2.70.0270.06749.06
5.2.60.0200.06349.19
5.2.50.0170.07349.11
5.2.40.0170.05320.29
5.2.30.0130.06020.27
5.2.20.0100.06720.19
5.2.10.0070.06020.16
5.2.00.0100.06320.09
5.1.60.0030.05719.39
5.1.50.0070.05719.30
5.1.40.0000.06019.37
5.1.30.0100.04019.55
5.1.20.0030.06019.77
5.1.10.0070.06019.33
5.1.00.0070.05019.39
5.0.50.0070.04017.59
5.0.40.0100.04717.61
5.0.30.0070.07017.36
5.0.20.0130.04317.42
5.0.10.0130.04317.39
5.0.00.0170.05717.37
4.4.90.0030.04015.19
4.4.80.0070.03715.17
4.4.70.0130.03315.10
4.4.60.0070.04015.10
4.4.50.0100.03315.13
4.4.40.0030.05715.09
4.4.30.0070.03715.20
4.4.20.0100.03715.15
4.4.10.0030.04015.16
4.4.00.0100.04715.09
4.3.110.0070.03714.99
4.3.100.0100.03315.02
4.3.90.0100.03315.11
4.3.80.0130.04314.99
4.3.70.0100.03315.02
4.3.60.0070.03315.10
4.3.50.0130.03315.09
4.3.40.0030.06014.93
4.3.30.0070.03713.80
4.3.20.0100.03013.83
4.3.10.0070.03713.72
4.3.00.0170.03013.74

preferences:
37.46 ms | 401 KiB | 5 Q