3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foobar { public function call($method, $parameters) { if (in_array($method, ['foo', 'bar'])) { return $this->$method($parameters); } $message = 'Hello world.'; return $this->$method($message, $parameters); } public function dump($message, ...$params) { echo $message . PHP_EOL; 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->call('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.0100.01018.54
8.3.50.0130.00522.84
8.3.40.0110.01118.76
8.3.30.0140.00319.17
8.3.20.0070.00020.20
8.3.10.0050.00323.55
8.3.00.0030.00517.75
8.2.180.0070.00716.75
8.2.170.0070.01422.96
8.2.160.0110.00420.53
8.2.150.0070.01124.18
8.2.140.0080.00024.66
8.2.130.0000.00926.16
8.2.120.0050.00320.90
8.2.110.0030.00722.13
8.2.100.0060.00617.84
8.2.90.0090.00022.15
8.2.80.0000.00817.97
8.2.70.0060.00618.05
8.2.60.0000.00818.04
8.2.50.0040.00418.10
8.2.40.0040.00420.61
8.2.30.0000.00718.13
8.2.20.0000.00817.70
8.2.10.0040.00418.13
8.2.00.0000.00917.78
8.1.280.0070.00725.92
8.1.270.0000.00822.10
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.48
8.1.230.0110.00021.04
8.1.220.0000.00917.74
8.1.210.0060.00318.95
8.1.200.0040.00417.23
8.1.190.0050.00317.13
8.1.180.0030.00618.10
8.1.170.0030.00518.43
8.1.160.0070.00022.14
8.1.150.0030.00618.95
8.1.140.0070.00017.53
8.1.130.0030.00317.53
8.1.120.0050.00217.45
8.1.110.0080.00017.36
8.1.100.0040.00417.39
8.1.90.0000.00717.36
8.1.80.0040.00417.38
8.1.70.0030.00317.34
8.1.60.0030.00517.62
8.1.50.0060.00317.43
8.1.40.0080.00017.43
8.1.30.0050.00317.56
8.1.20.0040.00417.63
8.1.10.0000.00817.52
8.1.00.0040.00417.50
8.0.300.0060.00319.92
8.0.290.0030.00516.75
8.0.280.0040.00418.46
8.0.270.0030.00317.28
8.0.260.0000.00816.85
8.0.250.0000.00716.89
8.0.240.0030.00317.04
8.0.230.0070.00016.96
8.0.220.0050.00216.89
8.0.210.0040.00416.93
8.0.200.0070.00016.99
8.0.190.0030.00317.06
8.0.180.0000.00816.97
8.0.170.0040.00416.96
8.0.160.0000.00716.91
8.0.150.0070.00016.90
8.0.140.0000.00816.82
8.0.130.0040.00413.29
8.0.120.0030.00616.90
8.0.110.0040.00416.95
8.0.100.0040.00416.82
8.0.90.0030.00316.99
8.0.80.0060.01016.95
8.0.70.0080.00016.83
8.0.60.0040.00416.93
8.0.50.0070.00016.80
8.0.30.0110.01017.21
8.0.20.0120.00617.40
8.0.10.0050.00316.90
8.0.00.0110.00817.03
7.4.330.0000.00615.09
7.4.320.0070.00016.55
7.4.300.0030.00316.60
7.4.290.0030.00316.58
7.4.280.0040.00416.52
7.4.270.0050.00216.52
7.4.260.0070.00016.60
7.4.250.0040.00416.56
7.4.240.0030.00316.63
7.4.230.0000.00716.50
7.4.220.0160.01016.70
7.4.210.0000.01516.46
7.4.200.0030.00316.51
7.4.160.0110.00416.80
7.4.150.0100.01017.40
7.4.140.0070.00917.86
7.4.130.0060.01216.51
7.4.120.0160.00116.63
7.4.110.0130.00316.71
7.4.100.0130.00316.63
7.4.90.0140.00316.34
7.4.80.0160.00919.39
7.4.70.0030.01316.60
7.4.60.0100.00716.43
7.4.50.0040.00416.30
7.4.40.0130.00316.35
7.4.30.0070.01116.46
7.4.00.0060.00915.12
7.3.330.0040.00313.33
7.3.320.0030.00313.31
7.3.310.0040.00416.33
7.3.300.0030.00316.42
7.3.290.0060.01016.37
7.3.280.0120.00516.34
7.3.270.0060.01217.40
7.3.260.0070.01016.43
7.3.250.0100.00616.40
7.3.240.0030.01416.57
7.3.230.0030.01316.46
7.3.210.0110.00516.43
7.3.200.0090.00919.39
7.3.190.0120.00816.38
7.3.180.0030.01216.43
7.3.170.0060.01316.43
7.3.160.0060.01016.65
7.3.10.0060.00916.57
7.3.00.0070.00716.75
7.2.330.0140.00416.54
7.2.320.0100.01016.42
7.2.310.0100.00716.70
7.2.300.0140.00716.72
7.2.290.0070.01416.54
7.2.130.0030.00616.84
7.2.120.0030.00916.79
7.2.110.0070.00317.00
7.2.100.0040.01116.71
7.2.90.0040.00716.85
7.2.80.0040.01016.72
7.2.70.0050.00516.93
7.2.60.0060.00616.65
7.2.50.0030.00716.96
7.2.40.0080.00817.01
7.2.30.0000.01316.72
7.2.20.0110.00416.71
7.2.10.0130.00316.86
7.2.00.0040.01018.00
7.1.250.0030.01415.89
7.1.200.0040.00415.73
7.1.100.0030.01017.91
7.1.70.0000.00817.06
7.1.60.0090.00919.40
7.1.50.0070.01416.95
7.1.00.0070.07322.51
7.0.200.0140.00616.63
7.0.140.0100.06722.04
7.0.60.0130.04319.88
7.0.50.0030.08317.86
7.0.40.0070.04320.11
7.0.30.0200.04020.24
7.0.20.0200.06020.33
7.0.10.0170.07720.09
7.0.00.0030.04020.32
5.6.280.0000.07720.79
5.6.210.0030.06320.48
5.6.200.0030.08318.14
5.6.190.0030.07720.45
5.6.180.0230.08020.39
5.6.170.0230.08020.47
5.6.160.0070.05320.52
5.6.150.0100.06718.18
5.6.140.0070.08018.26
5.6.130.0070.05318.25
5.6.120.0070.05021.14
5.6.110.0300.07020.98
5.6.100.0130.04021.00
5.6.90.0030.04721.08
5.6.80.0030.08320.51
5.5.350.0370.07020.48
5.5.340.0070.04318.04
5.5.330.0100.07320.41
5.5.320.0200.05320.52
5.5.310.0330.07020.23
5.5.300.0100.04317.98
5.5.290.0100.03317.98
5.5.280.0000.08720.88
5.5.270.0100.05320.88
5.5.260.0170.07720.88
5.5.250.0070.06020.71
5.5.240.0000.04020.29
5.4.450.2900.04319.53
5.4.440.2600.04019.57
5.4.430.2570.04019.32
5.4.420.2500.04319.54
5.4.410.2600.03319.19
5.4.400.2730.04319.11
5.4.390.2670.03719.09
5.4.380.2600.03718.95
5.4.370.2230.02718.84
5.4.360.2600.03319.20
5.4.350.2170.03718.87
5.4.340.2400.03718.95
5.4.320.2570.03719.32
5.4.310.2370.04019.09
5.4.300.2500.04018.87
5.4.290.2600.04018.88
5.4.280.2470.03319.21
5.4.270.1630.04019.22
5.4.260.0000.04019.18
5.4.250.0000.04018.99
5.4.240.0070.04719.06
5.4.230.1530.04019.14
5.4.220.2430.04719.19
5.4.210.2770.04319.24
5.4.200.2400.03718.99
5.4.190.2270.03719.21
5.4.180.2830.03018.95
5.4.170.1600.03719.21
5.4.160.1830.03319.22
5.4.150.2370.04719.07
5.4.140.2370.03716.34
5.4.130.2270.03716.30
5.4.120.2730.03016.31
5.4.110.2670.03716.45
5.4.100.2700.03316.36
5.4.90.2670.03716.53
5.4.80.2700.03016.27
5.4.70.2730.03316.56
5.4.60.2830.03316.49
5.4.50.2730.03016.16
5.4.40.3200.04316.51
5.4.30.2970.03716.23
5.4.20.2670.03316.53
5.4.10.2730.04016.53
5.4.00.3470.03715.82
5.3.290.2870.04314.67
5.3.280.2830.04314.67
5.3.270.2870.03714.52
5.3.260.3000.04714.68
5.3.250.2870.03714.66
5.3.240.2270.04014.69
5.3.230.2600.04314.50
5.3.220.2530.04014.54
5.3.210.2800.04314.57
5.3.200.2600.03714.79
5.3.190.2530.04014.68
5.3.180.2630.03314.57
5.3.170.2770.04014.64
5.3.160.2870.03314.58
5.3.150.2830.03714.52
5.3.140.2430.03714.63
5.3.130.2500.04014.46
5.3.120.2930.03714.46
5.3.110.2870.04014.52
5.3.100.2630.03013.95
5.3.90.2800.04013.92
5.3.80.2630.03713.95
5.3.70.2770.04314.00
5.3.60.2930.03014.02
5.3.50.2730.04313.96
5.3.40.2600.03714.00
5.3.30.2770.03714.02
5.3.20.3030.03013.84
5.3.10.2570.03313.88
5.3.00.2570.03713.62
5.2.170.2200.03011.26
5.2.160.2230.03011.06
5.2.150.2500.03311.12
5.2.140.2370.01711.37
5.2.130.2230.02711.19
5.2.120.2300.01711.22
5.2.110.2170.03011.05
5.2.100.2170.03011.15
5.2.90.2500.02711.11
5.2.80.2570.02311.02
5.2.70.2670.03710.98
5.2.60.2600.04010.98
5.2.50.2600.03710.94
5.2.40.2100.02010.91
5.2.30.1800.02711.05
5.2.20.2130.03010.88
5.2.10.2100.03311.02
5.2.00.1600.03310.64
5.1.60.1800.02310.00
5.1.50.1930.0209.93
5.1.40.1770.0239.86
5.1.30.1900.02710.48
5.1.20.2070.02710.47
5.1.10.1870.02710.05
5.1.00.1770.03010.00
5.0.50.1030.0208.55
5.0.40.0900.0208.31
5.0.30.1170.0378.20
5.0.20.1030.0278.08
5.0.10.0970.0238.07
5.0.00.1070.0408.07
4.4.90.1100.0238.04
4.4.80.1100.0238.04
4.4.70.1100.0238.04
4.4.60.1070.0238.04
4.4.50.1100.0208.04
4.4.40.0970.0238.04
4.4.30.0830.0178.04
4.4.20.1130.0178.04
4.4.10.0830.0178.04
4.4.00.1070.0338.04
4.3.110.0970.0108.04
4.3.100.1000.0178.04
4.3.90.1070.0208.04
4.3.80.1070.0308.04
4.3.70.0900.0178.04
4.3.60.0870.0138.04
4.3.50.1100.0208.04
4.3.40.1100.0308.04
4.3.30.0530.0278.04
4.3.20.0470.0208.04
4.3.10.0600.0208.04
4.3.00.0600.0208.04

preferences:
41.7 ms | 401 KiB | 5 Q