3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foobar { public function a($method, $parameters) { if (in_array($method, ['foo', 'bar'])) { return $this->$method($parameters); } return call_user_func_array(array($query, $method), $parameters); } public function dump(...$params) { return var_dump($params); } public function foo(...$params) { return in_array('foobar', $params); } public function bar(...$params) { return in_array('barfoo', $params); } } $foobar = new Foobar; echo $foobar->foo('foobar', 'test', 'hello');

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.0040.01118.43
8.3.50.0110.00722.82
8.3.40.0120.00918.84
8.3.30.0110.00319.05
8.3.20.0040.00420.16
8.3.10.0040.00423.51
8.3.00.0040.00417.75
8.2.180.0110.00716.63
8.2.170.0130.00622.96
8.2.160.0100.00320.38
8.2.150.0110.00724.18
8.2.140.0000.00824.66
8.2.130.0110.00426.16
8.2.120.0050.00221.06
8.2.110.0080.00022.12
8.2.100.0000.01217.72
8.2.90.0000.00819.09
8.2.80.0060.00317.97
8.2.70.0060.00317.50
8.2.60.0050.00317.77
8.2.50.0030.00518.07
8.2.40.0000.00818.22
8.2.30.0000.00818.03
8.2.20.0000.00717.61
8.2.10.0070.00017.91
8.2.00.0000.00717.49
8.1.280.0130.00725.92
8.1.270.0120.00323.96
8.1.260.0080.00026.35
8.1.250.0140.00328.09
8.1.240.0090.00023.88
8.1.230.0060.00619.15
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0120.00016.86
8.1.190.0090.00017.22
8.1.180.0000.00918.10
8.1.170.0050.00318.50
8.1.160.0080.00021.85
8.1.150.0050.00318.81
8.1.140.0040.00417.31
8.1.130.0000.00717.86
8.1.120.0000.00817.38
8.1.110.0040.00417.36
8.1.100.0040.00417.34
8.1.90.0040.00417.23
8.1.80.0000.00717.35
8.1.70.0000.00717.34
8.1.60.0030.00517.57
8.1.50.0030.00517.53
8.1.40.0030.00517.44
8.1.30.0080.00017.61
8.1.20.0040.00417.64
8.1.10.0020.00517.55
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0030.00516.75
8.0.280.0030.00318.48
8.0.270.0000.00817.36
8.0.260.0060.00017.25
8.0.250.0030.00316.88
8.0.240.0000.00616.96
8.0.230.0070.00016.83
8.0.220.0060.00016.82
8.0.210.0070.00016.69
8.0.200.0000.00616.94
8.0.190.0030.00316.88
8.0.180.0030.00616.86
8.0.170.0000.00716.73
8.0.160.0080.00016.91
8.0.150.0050.00316.83
8.0.140.0000.00716.70
8.0.130.0050.00213.16
8.0.120.0000.00816.79
8.0.110.0000.00716.71
8.0.100.0000.00716.88
8.0.90.0030.00516.81
8.0.80.0070.00716.77
8.0.70.0040.00416.86
8.0.60.0070.00016.70
8.0.50.0040.00416.67
8.0.30.0080.01616.87
8.0.20.0090.01317.40
8.0.10.0070.00016.80
8.0.00.0080.01016.62
7.4.330.0030.00315.01
7.4.320.0030.00316.50
7.4.300.0000.00616.61
7.4.290.0000.00716.48
7.4.280.0040.00416.58
7.4.270.0000.00716.64
7.4.260.0000.00716.50
7.4.250.0070.00016.57
7.4.240.0020.00516.48
7.4.230.0000.00716.51
7.4.220.0080.02116.49
7.4.210.0090.00916.66
7.4.200.0030.00316.34
7.4.160.0120.00316.50
7.4.150.0100.01017.40
7.4.140.0060.01017.86
7.4.130.0100.00716.47
7.4.120.0120.00616.49
7.4.110.0060.01016.42
7.4.100.0090.00916.52
7.4.90.0090.00916.50
7.4.80.0100.00719.39
7.4.70.0070.01116.52
7.4.60.0140.00416.55
7.4.50.0020.00216.65
7.4.40.0140.00316.48
7.4.30.0150.00616.73
7.4.00.0070.00615.08
7.3.330.0000.00613.26
7.3.320.0000.00613.22
7.3.310.0000.00716.26
7.3.300.0030.00316.23
7.3.290.0090.00616.23
7.3.280.0120.00316.17
7.3.270.0150.01017.40
7.3.260.0100.00716.27
7.3.250.0120.00416.30
7.3.240.0070.01016.29
7.3.230.0160.00316.39
7.3.210.0050.01116.30
7.3.200.0000.02019.39
7.3.190.0030.01316.31
7.3.180.0060.01016.21
7.3.170.0110.01116.27
7.3.160.0060.01016.29
7.3.120.0080.00414.61
7.3.110.0080.00714.77
7.3.100.0050.00714.99
7.3.90.0070.00714.74
7.3.80.0040.00814.64
7.3.70.0080.00614.73
7.3.60.0020.01114.78
7.3.50.0110.00314.81
7.3.40.0040.00914.70
7.3.30.0020.00914.62
7.3.20.0080.00616.55
7.3.10.0080.00816.52
7.3.00.0110.00616.56
7.2.330.0160.00616.38
7.2.320.0180.00016.41
7.2.310.0060.01516.36
7.2.300.0100.01016.46
7.2.290.0070.01316.33
7.2.250.0030.01314.96
7.2.240.0070.00814.98
7.2.230.0070.00815.04
7.2.220.0060.00914.87
7.2.210.0040.00915.04
7.2.200.0060.00615.17
7.2.190.0080.00215.00
7.2.180.0080.00514.93
7.2.170.0050.00514.80
7.2.160.0110.00314.83
7.2.150.0080.00416.99
7.2.140.0070.00716.84
7.2.130.0080.00816.98
7.2.120.0080.00816.58
7.2.110.0150.00516.51
7.2.100.0060.01116.63
7.2.90.0120.00716.68
7.2.80.0040.01216.49
7.2.70.0110.01116.50
7.2.60.0070.00816.63
7.2.50.0110.00716.63
7.2.40.0120.01116.59
7.2.30.0120.00716.53
7.2.20.0120.00516.38
7.2.10.0100.00816.55
7.2.00.0050.01016.80
7.1.330.0050.00715.76
7.1.320.0060.00515.78
7.1.310.0020.01515.73
7.1.300.0080.00315.61
7.1.290.0020.00815.58
7.1.280.0050.00715.72
7.1.270.0050.00815.79
7.1.260.0060.00715.69
7.1.250.0050.01015.57
7.1.70.0120.00316.95
7.1.60.0040.01119.40
7.1.50.0030.01316.98
7.1.00.0030.07722.48
7.0.200.0230.00316.20
7.0.140.0030.07022.15
7.0.110.0170.08319.91
7.0.100.0170.06719.98
7.0.90.0070.05719.97
7.0.80.0100.04020.08
7.0.70.0030.04319.89
7.0.60.0130.07319.93
7.0.50.0070.04319.94
7.0.40.0200.06719.86
7.0.30.0100.05319.78
7.0.20.0100.03319.73
7.0.10.0070.05019.64
7.0.00.0030.04019.84
5.6.280.0000.07721.00
5.6.260.0070.08320.71
5.6.250.0070.05320.66
5.6.240.0000.04720.55
5.6.230.0100.03720.72
5.6.220.0100.03020.69
5.6.210.0100.05720.68
5.6.200.0100.06020.69
5.6.190.0100.07320.63
5.6.180.0030.08320.62
5.6.170.0070.04320.66
5.6.160.0000.04320.56
5.6.150.0100.05320.71
5.6.140.0030.04320.66
5.6.130.0000.06020.61
5.6.120.0070.03720.47
5.6.110.0030.04320.55
5.6.100.0070.05720.63
5.6.90.0130.04020.61
5.6.80.0030.03720.02
5.6.70.0070.04019.84
5.6.60.0130.06320.06
5.6.50.0100.03720.21
5.6.40.0030.04720.02
5.6.30.0000.04319.99
5.6.20.0000.04319.91
5.6.10.0030.05319.94
5.6.00.0100.03320.04
5.5.380.0070.04720.30
5.5.370.0030.04020.26
5.5.360.0030.03720.36
5.5.350.0030.04020.46
5.5.340.0130.05021.02
5.5.330.0100.03720.82
5.5.320.0030.06720.79
5.5.310.0000.04320.95
5.5.300.0130.06720.79
5.5.290.0030.05020.90
5.5.280.0070.05320.69
5.5.270.0070.03720.89
5.5.260.0000.04720.89
5.5.250.0030.05720.56
5.5.240.0100.06320.20
5.5.230.0000.04320.37
5.5.220.0030.04320.40
5.5.210.0000.04320.19
5.5.200.0070.08020.26
5.5.190.0070.03720.39
5.5.180.0070.04320.32
5.5.160.0030.04320.10
5.5.150.0130.02720.24
5.5.140.0000.04320.30
5.5.130.0030.07720.29
5.5.120.0130.07320.05
5.5.110.0000.08320.13
5.5.100.0030.08020.20
5.5.90.0070.07720.01
5.5.80.0000.06320.17
5.5.70.0070.08019.98
5.5.60.0100.07020.07
5.5.50.0100.07020.22
5.5.40.0130.06720.16
5.5.30.0130.07020.21
5.5.20.0100.07720.26
5.5.10.0100.07720.14
5.5.00.0070.05020.22
5.4.450.0000.06319.36
5.4.440.0000.06319.31
5.4.430.0070.03719.49
5.4.420.0030.03719.35
5.4.410.0030.05319.34
5.4.400.0070.04019.04
5.4.390.0070.03319.00
5.4.380.0000.04019.35
5.4.370.0030.03719.01
5.4.360.0000.04019.34
5.4.350.0000.04019.23
5.4.340.0030.06719.34
5.4.320.0000.04319.38
5.4.310.0000.04019.18
5.4.300.0030.03719.10
5.4.290.0030.05018.96
5.4.280.0200.05319.23
5.4.270.0070.07719.16
5.4.260.0130.06718.95
5.4.250.0030.08019.31
5.4.240.0070.07019.18
5.4.230.0100.07319.22
5.4.220.0100.07719.00
5.4.210.0170.04018.98
5.4.200.0000.07719.13
5.4.190.0170.03719.00
5.4.180.0030.05018.97
5.4.170.0030.04718.94
5.4.160.0070.07319.20
5.4.150.0170.06319.21
5.4.140.0100.04016.63
5.4.130.0070.07716.35
5.4.120.0030.07716.61
5.4.110.0030.07716.46
5.4.100.0130.03716.55
5.4.90.0000.04016.46
5.4.80.0070.06716.50
5.4.70.0130.06716.64
5.4.60.0070.07316.57
5.4.50.0070.07016.46
5.4.40.0070.07716.34
5.4.30.0100.06716.32
5.4.20.0070.07016.28
5.4.10.0030.04016.45
5.4.00.0070.04715.78
5.3.290.0070.03714.66
5.3.280.0100.07014.59
5.3.270.0070.07714.61
5.3.260.0070.07314.62
5.3.250.0130.06314.69
5.3.240.0070.07314.61
5.3.230.0070.06014.72
5.3.220.0000.04714.66
5.3.210.0070.07014.52
5.3.200.0130.06314.71
5.3.190.0130.07014.70
5.3.180.0130.07014.66
5.3.170.0100.07314.42
5.3.160.0100.07314.57
5.3.150.0030.07714.59
5.3.140.0030.08014.63
5.3.130.0030.07714.54
5.3.120.0070.07714.68
5.3.110.0130.04314.69
5.3.100.0130.07314.13
5.3.90.0030.07014.11
5.3.80.0000.04314.10
5.3.70.0070.06014.04
5.3.60.0070.07314.02
5.3.50.0070.07013.94
5.3.40.0170.06714.03
5.3.30.0070.07014.04
5.3.20.0030.07713.92
5.3.10.0100.04013.88
5.3.00.0100.06713.73
5.2.170.0100.06012.20
5.2.160.0130.05012.20
5.2.150.0030.06712.20
5.2.140.0030.06312.20
5.2.130.0000.06012.20
5.2.120.0030.06312.20
5.2.110.0030.04712.20
5.2.100.0100.06012.20
5.2.90.0030.06012.20
5.2.80.0030.03712.20
5.2.70.0130.05312.20
5.2.60.0030.06012.20
5.2.50.0070.05712.20
5.2.40.0000.06312.20
5.2.30.0070.06012.20
5.2.20.0100.05312.20
5.2.10.0070.04712.20
5.2.00.0030.06312.20
5.1.60.0000.05712.20
5.1.50.0030.05312.20
5.1.40.0030.05312.20
5.1.30.0070.05712.20
5.1.20.0070.05312.20
5.1.10.0100.04012.20
5.1.00.0000.03312.20
5.0.50.0000.04312.20
5.0.40.0000.05012.20
5.0.30.0000.06712.20
5.0.20.0030.02312.20
5.0.10.0070.04012.20
5.0.00.0000.06312.20
4.4.90.0070.02712.20
4.4.80.0070.03012.20
4.4.70.0070.03312.20
4.4.60.0030.03712.20
4.4.50.0070.03312.20
4.4.40.0070.04312.20
4.4.30.0030.03312.20
4.4.20.0030.03312.20
4.4.10.0030.03312.20
4.4.00.0000.05712.20
4.3.110.0070.03312.20
4.3.100.0030.03312.20
4.3.90.0030.03712.20
4.3.80.0030.02712.20
4.3.70.0030.02712.20
4.3.60.0100.01012.20
4.3.50.0030.03312.20
4.3.40.0070.03312.20
4.3.30.0000.02012.20
4.3.20.0000.03712.20
4.3.10.0030.03712.20
4.3.00.0030.01712.20

preferences:
41.92 ms | 401 KiB | 5 Q