3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface TestInterface { public function foo(); } class Test implements TestInterface { public function foo(...$extraArgs) { $closureToCall = 'max'; //this function accepts multiple args $start = microtime(true); for ($i=0; $i<1e5; $i++) { } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; $start = microtime(true); for ($i=0; $i<1e5; $i++) { } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; } } $obj = new Test; $obj->foo();

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.0050.01614.88
7.4.00.0060.01114.81
7.3.130.0080.01214.65
7.3.120.0090.01014.75
7.3.110.0080.01114.74
7.3.100.0060.01014.68
7.3.90.0070.01014.85
7.3.80.0070.00914.70
7.3.70.0080.00914.60
7.3.60.0060.00914.79
7.3.50.0060.00714.86
7.3.40.0080.00714.82
7.3.30.0030.01414.76
7.3.20.0070.01016.57
7.3.10.0030.01116.50
7.3.00.0070.00916.46
7.2.260.0040.01414.85
7.2.250.0070.01415.07
7.2.240.0040.01415.12
7.2.230.0040.01215.08
7.2.220.0050.01215.21
7.2.210.0050.01415.06
7.2.200.0030.01414.96
7.2.190.0070.00814.95
7.2.180.0050.01214.95
7.2.170.0050.01015.00
7.2.160.0050.01114.99
7.2.150.0080.00816.69
7.2.140.0040.01316.73
7.2.130.0070.00916.74
7.2.120.0030.01216.98
7.2.110.0030.01316.97
7.2.100.0070.01016.91
7.2.90.0080.01016.86
7.2.80.0070.00916.92
7.2.70.0060.01116.91
7.2.60.0070.01016.77
7.2.50.0050.00916.80
7.2.40.0060.01016.99
7.2.30.0060.00816.84
7.2.20.0100.00516.92
7.2.10.0050.01116.91
7.2.00.0060.00917.58
7.1.330.0080.01215.62
7.1.320.0040.01715.84
7.1.310.0070.01215.72
7.1.300.0040.01515.80
7.1.290.0030.01415.81
7.1.280.0030.01715.76
7.1.270.0080.01115.52
7.1.260.0040.01215.69
7.1.250.0050.01515.70
7.1.240.0050.01315.74
7.1.230.0070.01115.84
7.1.220.0070.01215.67
7.1.210.0040.01415.67
7.1.200.0070.01215.50
7.1.190.0010.01615.84
7.1.180.0060.01215.66
7.1.170.0090.01315.81
7.1.160.0050.01315.58
7.1.150.0060.01215.75
7.1.140.0050.01315.79
7.1.130.0080.01315.84
7.1.120.0060.01515.75
7.1.110.0020.01715.65
7.1.100.0070.01315.70
7.1.90.0080.01215.73
7.1.80.0050.01515.66
7.1.70.0030.01216.18
7.1.60.0040.01716.66
7.1.50.0090.01416.02
7.1.40.0090.01115.60
7.1.30.0050.01515.65
7.1.20.0070.01315.80
7.1.10.0070.01415.73
7.1.00.0050.03017.33
7.0.330.0060.01115.40
7.0.320.0050.01315.38
7.0.310.0030.01515.26
7.0.300.0080.01115.30
7.0.290.0010.01915.25
7.0.280.0050.01515.27
7.0.270.0020.01815.40
7.0.260.0030.01615.26
7.0.250.0080.01115.57
7.0.240.0060.01415.33
7.0.230.0050.01415.32
7.0.220.0060.01215.46
7.0.210.0060.01515.41
7.0.200.0040.01315.86
7.0.190.0050.01615.42
7.0.180.0040.01415.32
7.0.170.0040.01515.50
7.0.160.0030.01615.29
7.0.150.0040.01415.49
7.0.140.0030.03017.10
7.0.130.0060.01515.46
7.0.120.0080.01315.38
7.0.110.0130.02916.48
7.0.100.0070.02816.49
7.0.90.0140.02516.58
7.0.80.0180.03116.61
7.0.70.0160.02916.38
7.0.60.0150.02916.49
7.0.50.0180.01616.61
7.0.40.0110.02914.90
7.0.30.0050.03314.93
7.0.20.0040.02215.02
7.0.10.0020.02315.04
7.0.00.0020.02514.97
5.6.400.0080.02114.31
5.6.390.0050.02214.23
5.6.380.0030.02614.35
5.6.370.0070.02214.43
5.6.360.0040.02314.55
5.6.350.0070.02114.43
5.6.340.0040.02314.42
5.6.330.0030.02114.43
5.6.320.0070.02314.54
5.6.310.0080.02214.29
5.6.300.0080.02114.39
5.6.290.0040.02214.18
5.6.280.0010.04115.94
5.6.270.0090.01814.49
5.6.260.0030.02815.86
5.6.250.0040.03315.83
5.6.240.0080.02615.94
5.6.230.0080.03116.02
5.6.220.0070.03215.86
5.6.210.0030.03015.92
5.6.200.0100.03715.95
5.6.190.0040.04115.84
5.6.180.0060.03315.89
5.6.170.0060.03015.81
5.6.160.0070.02815.80
5.6.150.0040.03115.83
5.6.140.0030.02915.85
5.6.130.0050.02715.90
5.6.120.0040.02815.89
5.6.110.0080.03715.75
5.6.100.0040.03015.91
5.6.90.0070.03715.70
5.6.80.0070.03315.60
5.6.70.0050.03315.58
5.6.60.0040.02615.73
5.6.50.0070.03815.68
5.6.40.0040.03915.66
5.6.30.0050.03515.65
5.6.20.0020.03915.66
5.6.10.0060.03715.56
5.6.00.0050.02415.60
5.5.380.0040.01814.96
5.5.370.0040.01714.91
5.5.360.0070.01914.94
5.5.350.0040.02014.94
5.5.340.0050.02315.04
5.5.330.0070.02314.91
5.5.320.0050.02015.19
5.5.310.0020.01615.09
5.5.300.0070.01215.09
5.5.290.0060.01514.99
5.5.280.0030.02115.05
5.5.270.0070.02415.09
5.5.260.0070.02615.02
5.5.250.0040.01414.92
5.5.240.0050.01514.83
5.5.230.0040.02114.74
5.5.220.0070.01514.97
5.5.210.0050.01314.94
5.5.200.0030.02014.77
5.5.190.0030.01514.74
5.5.180.0050.02214.94
5.5.170.0050.00714.12
5.5.160.0080.02214.82
5.5.150.0070.02114.83
5.5.140.0060.01314.91
5.5.130.0060.02014.84
5.5.120.0050.02014.76
5.5.110.0050.01414.83
5.5.100.0090.01114.79
5.5.90.0040.01414.71
5.5.80.0030.02214.74
5.5.70.0060.01514.87
5.5.60.0020.02414.61
5.5.50.0080.01814.75
5.5.40.0050.01314.85
5.5.30.0090.01214.69
5.5.20.0030.01514.79
5.5.10.0050.01614.65
5.5.00.0040.01414.76
5.4.450.0020.02613.55
5.4.440.0050.01213.53
5.4.430.0030.01413.48
5.4.420.0040.02013.52
5.4.410.0050.02013.45
5.4.400.0040.01413.42
5.4.390.0030.02313.44
5.4.380.0030.02013.45
5.4.370.0020.01813.47
5.4.360.0030.01913.41
5.4.350.0030.01713.40
5.4.340.0050.02113.50
5.4.330.0050.00611.56
5.4.320.0050.02313.41
5.4.310.0030.02113.42
5.4.300.0070.01413.50
5.4.290.0030.01713.50
5.4.280.0020.01313.47
5.4.270.0070.02113.42
5.4.260.0060.01913.41
5.4.250.0050.01213.40
5.4.240.0040.02113.43
5.4.230.0020.01413.45
5.4.220.0020.01813.48
5.4.210.0030.01413.48
5.4.200.0020.01613.40
5.4.190.0050.01213.48
5.4.180.0050.01213.42
5.4.170.0020.01613.40
5.4.160.0040.01413.49
5.4.150.0020.01713.41
5.4.140.0040.01612.75
5.4.130.0060.01112.80
5.4.120.0050.01212.75
5.4.110.0030.01312.82
5.4.100.0030.01112.82
5.4.90.0030.01112.83
5.4.80.0040.01112.82
5.4.70.0050.01012.78
5.4.60.0050.01212.78
5.4.50.0030.01312.80
5.4.40.0030.01312.81
5.4.30.0050.01212.76
5.4.20.0030.01212.76
5.4.10.0040.01212.78
5.4.00.0040.01312.67
5.3.290.0000.05314.68
5.3.280.0030.03714.75
5.3.270.0070.03314.76
5.3.260.0030.04014.84
5.3.250.0030.03714.73
5.3.240.0030.04314.63
5.3.230.0000.04014.59
5.3.220.0030.04014.70
5.3.210.0070.03014.65
5.3.200.0170.05314.56
5.3.190.0070.03014.56
5.3.180.0100.02314.53
5.3.170.0000.03314.58
5.3.160.0000.04314.42
5.3.150.0000.04014.58
5.3.140.0030.03014.57
5.3.130.0070.03014.41
5.3.120.0000.04314.41
5.3.110.0000.03714.55
5.3.100.0030.03014.19
5.3.90.0030.03713.88
5.3.80.0000.04014.10
5.3.70.0000.03714.16
5.3.60.0000.04014.05
5.3.50.0000.03714.07
5.3.40.0000.03313.95
5.3.30.0000.04013.87
5.3.20.0030.04013.69
5.3.10.0000.03013.64
5.3.00.0070.02713.78
5.2.170.0070.02711.93
5.2.160.0030.02711.93
5.2.150.0030.02311.93
5.2.140.0130.02011.93
5.2.130.0070.02011.93
5.2.120.0000.03011.93
5.2.110.0070.02011.93
5.2.100.0070.02011.93
5.2.90.0000.02711.93
5.2.80.0030.02311.93
5.2.70.0000.02711.93
5.2.60.0030.02311.93
5.2.50.0030.02311.93
5.2.40.0030.02711.93
5.2.30.0070.02011.93
5.2.20.0000.03011.93
5.2.10.0070.02011.93
5.2.00.0000.02311.93
5.1.60.0000.02011.93
5.1.50.0000.02311.93
5.1.40.0000.02011.93
5.1.30.0000.02311.93
5.1.20.0030.02011.93
5.1.10.0000.02311.93
5.1.00.0030.02011.93
5.0.50.0070.01311.93
5.0.40.0000.01711.93
5.0.30.0000.04311.93
5.0.20.0030.02711.93
5.0.10.0070.02011.93
5.0.00.0030.02711.93
4.4.90.0000.01311.93
4.4.80.0000.01311.93
4.4.70.0000.01711.93
4.4.60.0030.01011.93
4.4.50.0000.01311.93
4.4.40.0000.02011.93
4.4.30.0000.01711.93
4.4.20.0000.01311.93
4.4.10.0030.01011.93
4.4.00.0030.02011.93
4.3.110.0000.01311.93
4.3.100.0000.03311.93
4.3.90.0000.03711.93
4.3.80.0070.04011.93
4.3.70.0000.01711.93
4.3.60.0000.01711.93
4.3.50.0030.01711.93
4.3.40.0000.02311.93
4.3.30.0030.01711.93
4.3.20.0000.04011.93
4.3.10.0030.02311.93
4.3.00.0000.02711.93

preferences:
40.05 ms | 401 KiB | 5 Q