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 'foo ' . in_array('foobar', $params); } public function bar(...$params) { return 'bar ' . 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.40.0060.00918.73
8.3.30.0070.00719.01
8.3.20.0080.00020.34
8.3.10.0040.00423.66
8.3.00.0000.00817.50
8.2.170.0110.00422.96
8.2.160.0080.00820.47
8.2.150.0130.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00826.16
8.2.120.0040.00420.57
8.2.110.0090.00020.56
8.2.100.0090.00317.84
8.2.90.0000.00819.22
8.2.80.0080.00017.97
8.2.70.0000.00817.37
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0090.00018.22
8.2.30.0040.00417.99
8.2.20.0040.00417.68
8.2.10.0040.00418.05
8.2.00.0080.00017.67
8.1.270.0000.00823.88
8.1.260.0040.00426.35
8.1.250.0100.00728.09
8.1.240.0030.00723.87
8.1.230.0120.00019.08
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0090.00317.00
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0040.00421.81
8.1.150.0030.00618.82
8.1.140.0030.00617.25
8.1.130.0070.00017.66
8.1.120.0050.00217.32
8.1.110.0040.00417.39
8.1.100.0080.00017.42
8.1.90.0030.00317.38
8.1.80.0050.00217.42
8.1.70.0030.00317.35
8.1.60.0060.00317.60
8.1.50.0050.00317.53
8.1.40.0000.00917.50
8.1.30.0030.00617.57
8.1.20.0040.00417.55
8.1.10.0000.00717.59
8.1.00.0040.00417.51
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.32
8.0.270.0030.00317.17
8.0.260.0060.00017.23
8.0.250.0030.00316.92
8.0.240.0030.00316.95
8.0.230.0000.00716.91
8.0.220.0070.00016.89
8.0.210.0040.00416.87
8.0.200.0040.00416.82
8.0.190.0040.00416.80
8.0.180.0050.00216.91
8.0.170.0040.00416.79
8.0.160.0000.00716.82
8.0.150.0000.00716.87
8.0.140.0040.00416.82
8.0.130.0000.00713.35
8.0.120.0000.00716.85
8.0.110.0000.00716.82
8.0.100.0030.00516.88
8.0.90.0000.00716.92
8.0.80.0090.00616.80
8.0.70.0030.00616.85
8.0.60.0000.00816.63
8.0.50.0030.00516.86
8.0.30.0100.01216.85
8.0.20.0080.01417.40
8.0.10.0000.00716.96
8.0.00.0090.00916.61
7.4.330.0050.00015.09
7.4.320.0000.00716.50
7.4.300.0000.00616.39
7.4.290.0040.00416.52
7.4.280.0080.00016.56
7.4.270.0000.00716.51
7.4.260.0080.00016.34
7.4.250.0000.00716.57
7.4.240.0020.00516.54
7.4.230.0000.00716.67
7.4.220.0060.01216.47
7.4.210.0110.00416.70
7.4.200.0030.00316.57
7.4.160.0060.00916.43
7.4.150.0110.00817.40
7.4.140.0120.00517.86
7.4.130.0120.00716.60
7.4.120.0120.00516.32
7.4.110.0070.01016.45
7.4.100.0130.00716.48
7.4.90.0120.00616.27
7.4.80.0130.00919.39
7.4.70.0080.01116.60
7.4.60.0140.00716.56
7.4.50.0040.00416.63
7.4.40.0140.00316.66
7.4.30.0110.00916.30
7.4.00.0070.01014.90
7.3.330.0070.00013.11
7.3.320.0030.00313.07
7.3.310.0060.00016.19
7.3.300.0040.00416.29
7.3.290.0080.00916.34
7.3.280.0110.00616.31
7.3.270.0090.00917.40
7.3.260.0090.00916.30
7.3.250.0060.01216.44
7.3.240.0060.01216.23
7.3.230.0030.01316.57
7.3.210.0100.00716.45
7.3.200.0070.01019.39
7.3.190.0090.01216.15
7.3.180.0030.01216.15
7.3.170.0060.00916.65
7.3.160.0080.00816.24
7.2.330.0090.01216.45
7.2.320.0110.00816.77
7.2.310.0100.00716.62
7.2.300.0060.01516.70
7.2.290.0130.00316.86
7.1.70.0040.00417.10
7.1.60.0130.00919.40
7.1.50.0160.01016.96
7.1.00.0030.07722.32
7.0.200.0150.00616.30
7.0.140.0000.08022.02
7.0.60.0030.08720.04
7.0.50.0030.04317.78
7.0.40.0070.04319.90
7.0.30.0230.05720.08
7.0.20.0230.08020.23
7.0.10.0100.08720.15
7.0.00.0100.04720.14
5.6.280.0030.07321.10
5.6.210.0070.07020.54
5.6.200.0100.05718.29
5.6.190.0070.04020.63
5.6.180.0270.04720.34
5.6.170.0270.08020.60
5.6.160.0070.08320.50
5.6.150.0070.04718.16
5.6.140.0030.05018.17
5.6.130.0100.03718.18
5.6.120.0100.07321.10
5.6.110.0070.07321.12
5.6.100.0100.04721.01
5.6.90.0030.04020.95
5.6.80.0030.04720.41
5.5.350.0200.07720.38
5.5.340.0100.07317.93
5.5.330.0130.08320.30
5.5.320.2830.04020.27
5.5.310.0270.07320.23
5.5.300.0030.03718.09
5.5.290.0070.07718.00
5.5.280.0130.07720.97
5.5.270.0070.08320.86
5.5.260.0070.04020.80
5.5.250.0070.05720.44
5.5.240.0000.04020.36
5.4.450.0400.06719.71
5.4.440.0730.06019.47
5.4.430.0170.04719.57
5.4.420.0200.05019.53
5.4.410.0100.05319.00
5.4.400.0100.05018.63
5.4.390.0130.05018.84
5.4.380.0070.05718.57
5.4.370.0070.05318.80
5.4.360.0170.04718.71
5.4.350.0060.04912.03
5.4.340.0090.03412.03
5.4.320.0030.03812.52
5.4.310.0040.03912.52
5.4.300.0070.03612.52
5.4.290.0040.04012.51
5.4.280.0070.04512.41
5.4.270.0050.03912.41
5.4.260.0060.05312.41
5.4.250.0020.04012.41
5.4.240.0060.03712.41
5.4.230.0100.03512.40
5.4.220.0030.03812.41
5.4.210.0040.03612.40
5.4.200.0090.03312.40
5.4.190.0040.03712.40
5.4.180.0060.03812.40
5.4.170.0060.03612.41
5.4.160.0050.03612.41
5.4.150.0040.03612.40
5.4.140.0110.03212.09
5.4.130.0050.03612.07
5.4.120.0070.03412.04
5.4.110.0060.03612.04
5.4.100.0060.03412.04
5.4.90.0080.03412.04
5.4.80.0060.03912.04
5.4.70.0040.03812.03
5.4.60.0050.03812.03
5.4.50.0060.03712.03
5.4.40.0080.03612.02
5.4.30.0100.03512.01
5.4.20.0050.03712.01
5.4.10.0070.04412.01
5.4.00.0050.03811.50
5.3.290.0020.04412.80
5.3.280.0060.03812.71
5.3.270.0050.04112.72
5.3.260.0050.03912.72
5.3.250.0080.03712.72
5.3.240.0070.03612.72
5.3.230.0030.04812.71
5.3.220.0060.03812.68
5.3.210.0060.03912.68
5.3.200.0060.04512.68
5.3.190.0070.03812.68
5.3.180.0040.03812.67
5.3.170.0050.03712.67
5.3.160.0040.03812.67
5.3.150.0040.03912.67
5.3.140.0070.03712.66
5.3.130.0050.04012.66
5.3.120.0050.03912.65
5.3.110.0060.03912.66
5.3.100.0100.03612.12
5.3.90.0080.04612.11
5.3.80.0030.03912.10
5.3.70.0050.03612.10
5.3.60.0080.04112.08
5.3.50.0050.03612.03
5.3.40.0070.03812.03
5.3.30.0060.03911.98
5.3.20.0060.03411.76
5.3.10.0050.03511.73
5.3.00.0040.03811.72
5.2.170.0080.0299.23
5.2.160.0070.0279.23
5.2.150.0020.0329.22
5.2.140.0030.0329.22
5.2.130.0020.0319.18
5.2.120.0090.0249.18
5.2.110.0050.0309.18
5.2.100.0050.0289.18
5.2.90.0060.0279.18
5.2.80.0060.0299.17
5.2.70.0060.0349.17
5.2.60.0060.0289.13
5.2.50.0060.0329.10
5.2.40.0050.0289.08
5.2.30.0050.0299.05
5.2.20.0040.0299.04
5.2.10.0060.0278.94
5.2.00.0040.0308.81
5.1.60.0050.0228.10
5.1.50.0020.0268.09
5.1.40.0040.0248.07
5.1.30.0050.0278.42
5.1.20.0040.0278.44
5.1.10.0040.0278.17
5.1.00.0040.0258.16
5.0.50.0050.0236.64
5.0.40.0030.0206.50
5.0.30.0050.0306.32
5.0.20.0040.0216.28
5.0.10.0010.0226.26
5.0.00.0040.0306.25
4.4.90.0010.0174.78
4.4.80.0010.0234.75
4.4.70.0020.0184.76
4.4.60.0010.0174.75
4.4.50.0060.0154.77
4.4.40.0040.0244.70
4.4.30.0040.0144.76
4.4.20.0050.0194.84
4.4.10.0020.0224.85
4.4.00.0050.0224.76
4.3.110.0020.0164.66
4.3.100.0040.0144.66
4.3.90.0010.0174.63
4.3.80.0040.0234.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0020.0204.63
4.3.40.0030.0314.54
4.3.30.0010.0173.30
4.3.20.0000.0183.28
4.3.10.0040.0143.24
4.3.00.0100.0236.82

preferences:
51.3 ms | 400 KiB | 5 Q