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->a('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.0090.01218.43
8.3.50.0100.00822.97
8.3.40.0040.01118.59
8.3.30.0100.00319.22
8.3.20.0040.00420.07
8.3.10.0080.00023.48
8.3.00.0050.00317.38
8.2.180.0070.00716.50
8.2.170.0140.00022.96
8.2.160.0100.00720.43
8.2.150.0100.01024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.01
8.2.110.0070.00322.20
8.2.100.0070.00717.91
8.2.90.0000.00822.37
8.2.80.0080.00017.97
8.2.70.0030.00717.68
8.2.60.0060.00318.03
8.2.50.0050.00318.10
8.2.40.0100.00020.43
8.2.30.0070.00018.04
8.2.20.0000.00817.70
8.2.10.0040.00417.97
8.2.00.0040.00417.79
8.1.280.0130.00725.92
8.1.270.0040.00423.96
8.1.260.0000.00826.35
8.1.250.0060.00828.09
8.1.240.0000.00922.59
8.1.230.0080.00320.90
8.1.220.0040.00417.76
8.1.210.0030.00618.88
8.1.200.0060.00317.22
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0000.00822.01
8.1.150.0000.00718.79
8.1.140.0040.00417.46
8.1.130.0000.00717.73
8.1.120.0040.00417.38
8.1.110.0050.00317.47
8.1.100.0000.00717.54
8.1.90.0040.00417.45
8.1.80.0000.00717.37
8.1.70.0030.00317.42
8.1.60.0040.00417.42
8.1.50.0080.00017.34
8.1.40.0040.00417.42
8.1.30.0030.00517.55
8.1.20.0040.00417.64
8.1.10.0000.00717.50
8.1.00.0000.00717.51
8.0.300.0040.00419.86
8.0.290.0080.00016.58
8.0.280.0030.00518.45
8.0.270.0070.00017.18
8.0.260.0080.00017.27
8.0.250.0070.00017.09
8.0.240.0030.00316.91
8.0.230.0040.00417.02
8.0.220.0030.00316.92
8.0.210.0000.00716.92
8.0.200.0000.00717.03
8.0.190.0000.00717.00
8.0.180.0000.00716.96
8.0.170.0040.00417.02
8.0.160.0040.00417.02
8.0.150.0040.00416.85
8.0.140.0040.00416.87
8.0.130.0000.00813.46
8.0.120.0050.00316.81
8.0.110.0040.00416.87
8.0.100.0030.00516.97
8.0.90.0000.00716.81
8.0.80.0060.00816.89
8.0.70.0030.00517.00
8.0.60.0040.00416.75
8.0.50.0000.00716.81
8.0.30.0100.01017.04
8.0.20.0060.01217.40
8.0.10.0000.00716.94
8.0.00.0100.00716.67
7.4.330.0050.00015.08
7.4.320.0060.00016.63
7.4.300.0000.00616.34
7.4.290.0000.00716.38
7.4.280.0040.00416.53
7.4.270.0080.00016.48
7.4.260.0030.00316.52
7.4.250.0000.00716.55
7.4.240.0030.00516.48
7.4.230.0000.00816.53
7.4.220.0070.01816.51
7.4.210.0040.01416.51
7.4.200.0070.00016.33
7.4.160.0090.00616.52
7.4.150.0120.01817.40
7.4.140.0090.00817.86
7.4.130.0100.00716.46
7.4.120.0110.00516.61
7.4.110.0060.01116.39
7.4.100.0150.00616.63
7.4.90.0120.00416.43
7.4.80.0030.01719.39
7.4.70.0120.00616.48
7.4.60.0110.00516.50
7.4.50.0000.00816.21
7.4.40.0110.00616.53
7.4.30.0100.00716.49
7.4.00.0080.00814.93
7.3.330.0070.00013.29
7.3.320.0000.00513.11
7.3.310.0000.00716.35
7.3.300.0050.00216.16
7.3.290.0070.01316.21
7.3.280.0060.00916.27
7.3.270.0110.00617.40
7.3.260.0130.00316.38
7.3.250.0110.00716.42
7.3.240.0100.00616.42
7.3.230.0040.01216.39
7.3.210.0150.00616.44
7.3.200.0100.00719.39
7.3.190.0060.01216.40
7.3.180.0040.01216.28
7.3.170.0150.00916.39
7.3.160.0110.00516.50
7.3.120.0090.00814.66
7.3.110.0110.00914.78
7.3.100.0050.01114.82
7.3.90.0100.00614.93
7.3.80.0060.00614.83
7.3.70.0060.00814.73
7.3.60.0080.00714.82
7.3.50.0050.01014.61
7.3.40.0030.01214.70
7.3.30.0100.00214.76
7.3.20.0060.00616.54
7.3.10.0080.00616.40
7.3.00.0040.00916.61
7.2.330.0100.00716.55
7.2.320.0120.01316.44
7.2.310.0040.01816.51
7.2.300.0090.01016.35
7.2.290.0100.00716.42
7.2.250.0100.00715.00
7.2.240.0050.01514.83
7.2.230.0060.01014.96
7.2.220.0050.01015.05
7.2.210.0090.00514.83
7.2.200.0080.00815.04
7.2.190.0080.00515.05
7.2.180.0110.00514.77
7.2.170.0050.00815.01
7.2.160.0060.00614.81
7.2.150.0060.01216.79
7.2.140.0060.00916.88
7.2.130.0030.00816.86
7.2.120.0020.01216.63
7.2.110.0040.00717.03
7.2.100.0020.01017.10
7.2.90.0040.00816.66
7.2.80.0100.00517.05
7.2.70.0050.01116.85
7.2.60.0040.00916.78
7.2.50.0050.00916.89
7.2.40.0050.01017.13
7.2.30.0040.00916.92
7.2.20.0030.00816.85
7.2.10.0060.00816.84
7.2.00.0060.00817.66
7.1.330.0110.00415.89
7.1.320.0060.00615.90
7.1.310.0060.00815.52
7.1.300.0070.00915.62
7.1.290.0060.00915.82
7.1.280.0100.00515.62
7.1.270.0070.00615.86
7.1.260.0030.01115.74
7.1.250.0020.01215.70
7.1.200.0000.01415.96
7.1.100.0030.01418.14
7.1.70.0040.00417.10
7.1.60.0230.00019.40
7.1.50.0040.02116.92
7.1.00.0070.07322.45
7.0.200.0150.00816.40
7.0.140.0130.06722.01
7.0.60.0000.08719.90
7.0.50.0000.04717.75
7.0.40.0070.09019.96
7.0.30.0130.04720.32
7.0.20.0270.03020.09
7.0.10.0330.05020.08
7.0.00.0100.08020.25
5.6.280.0030.07321.04
5.6.210.0000.04320.65
5.6.200.0030.07718.18
5.6.190.0030.05020.50
5.6.180.3870.03720.39
5.6.170.0200.04720.44
5.6.160.0130.04720.56
5.6.150.0100.07718.18
5.6.140.0170.07718.18
5.6.130.0030.05318.22
5.6.120.0070.06020.95
5.6.110.0030.08021.14
5.6.100.0100.09021.07
5.6.90.0070.07320.99
5.6.80.0070.08020.52
5.6.70.0230.07320.56
5.5.350.0330.06720.36
5.5.340.0130.06717.99
5.5.330.0030.04020.13
5.5.320.0400.05320.36
5.5.310.0230.08020.24
5.5.300.0070.04717.98
5.5.290.0030.08017.98
5.5.280.0070.08020.88
5.5.270.0070.04720.87
5.5.260.0130.06720.86
5.5.250.0200.06020.66
5.5.240.4130.04020.20
5.4.450.0770.06319.55
5.4.440.0770.05019.39
5.4.430.0730.06319.54
5.4.420.0130.05719.66
5.4.410.0430.07019.34
5.4.400.0500.04018.85
5.4.390.0370.04718.50
5.4.380.0200.05018.48
5.4.370.0070.04718.62
5.4.360.0070.04318.61
5.4.350.0050.04112.04
5.4.340.0050.03512.04
5.4.320.0080.06012.52
5.4.310.0060.03812.52
5.4.300.0070.03612.52
5.4.290.0070.03712.51
5.4.280.0050.03712.41
5.4.270.0090.04512.41
5.4.260.0120.04512.41
5.4.250.0070.05012.41
5.4.240.0120.04912.41
5.4.230.0040.04412.40
5.4.220.0100.04612.41
5.4.210.0060.04712.41
5.4.200.0060.05012.40
5.4.190.0060.04212.40
5.4.180.0050.04512.40
5.4.170.0060.03512.41
5.4.160.0040.04812.41
5.4.150.0080.04112.40
5.4.140.0060.04212.09
5.4.130.0070.04412.07
5.4.120.0100.04512.04
5.4.110.0050.04612.04
5.4.100.0030.04012.04
5.4.90.0060.03712.04
5.4.80.0040.03812.04
5.4.70.0060.03512.03
5.4.60.0100.03112.03
5.4.50.0040.03612.03
5.4.40.0070.03712.02
5.4.30.0050.03512.02
5.4.20.0070.03412.01
5.4.10.0120.03112.02
5.4.00.0050.03911.51
5.3.290.0060.04112.80
5.3.280.0050.04212.71
5.3.270.0040.04112.72
5.3.260.0030.04012.72
5.3.250.0070.03512.71
5.3.240.0100.03312.72
5.3.230.0080.04512.71
5.3.220.0050.03912.68
5.3.210.0050.05012.68
5.3.200.0080.03412.68
5.3.190.0080.03712.68
5.3.180.0040.04012.68
5.3.170.0030.03912.67
5.3.160.0050.03812.68
5.3.150.0070.03512.68
5.3.140.0050.03712.66
5.3.130.0080.04212.66
5.3.120.0070.03712.66
5.3.110.0100.03812.66
5.3.100.0060.04312.13
5.3.90.0080.04712.11
5.3.80.0060.03812.10
5.3.70.0060.03912.09
5.3.60.0040.04312.08
5.3.50.0090.04112.03
5.3.40.0080.03812.03
5.3.30.0060.04611.98
5.3.20.0070.04311.76
5.3.10.0050.03611.73
5.3.00.0060.03611.72
5.2.170.0040.0359.22
5.2.160.0050.0329.22
5.2.150.0070.0289.23
5.2.140.0080.0289.22
5.2.130.0040.0339.18
5.2.120.0040.0299.18
5.2.110.0050.0379.18
5.2.100.0050.0329.18
5.2.90.0090.0279.18
5.2.80.0090.0289.17
5.2.70.0040.0319.18
5.2.60.0040.0369.13
5.2.50.0050.0369.10
5.2.40.0050.0339.07
5.2.30.0070.0289.05
5.2.20.0050.0289.04
5.2.10.0080.0248.94
5.2.00.0050.0288.80
5.1.60.0030.0258.09
5.1.50.0050.0268.09
5.1.40.0050.0278.07
5.1.30.0050.0278.42
5.1.20.0020.0308.45
5.1.10.0060.0258.16
5.1.00.0020.0288.17
5.0.50.0070.0266.64
5.0.40.0030.0206.50
5.0.30.0040.0326.32
5.0.20.0050.0176.28
5.0.10.0040.0186.26
5.0.00.0050.0296.25
4.4.90.0020.0214.78
4.4.80.0060.0224.75
4.4.70.0030.0224.75
4.4.60.0050.0144.76
4.4.50.0040.0184.77
4.4.40.0040.0334.71
4.4.30.0020.0174.75
4.4.20.0030.0154.84
4.4.10.0010.0174.85
4.4.00.0040.0234.76
4.3.110.0020.0184.67
4.3.100.0020.0174.67
4.3.90.0020.0154.63
4.3.80.0040.0224.59
4.3.70.0010.0164.63
4.3.60.0040.0124.62
4.3.50.0030.0154.63
4.3.40.0020.0244.53
4.3.30.0010.0193.30
4.3.20.0000.0183.28
4.3.10.0020.0163.24
4.3.00.0170.0207.08

preferences:
44.73 ms | 401 KiB | 5 Q