3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { var_dump(__METHOD__); } public function baz() { var_dump(__METHOD__); } public function bat() { var_dump(__METHOD__); return 'bat!'; } } class FluentWrapper { private $instance; private $fluentMethods; public function __construct($instance, array $fluentMethods = []) { $this->instance = $instance; $this->fluentMethods = $fluentMethods; } public function __call($name, $args) { $result = call_user_func([$this->instance, $name], $args); return in_array($name, $this->fluentMethods) ? $this : $result; } } $foo = new FluentWrapper(new Foo(), ['bar', 'baz']); $bat = $foo ->bar() ->baz() ->bar() ->baz() ->bat(); print $bat."\n";

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.70.0120.00318.23
8.3.60.0150.00016.50
8.3.50.0170.00522.00
8.3.40.0070.01018.97
8.3.30.0110.00419.01
8.3.20.0070.00020.14
8.3.10.0050.00323.70
8.3.00.0000.00820.62
8.2.180.0140.00716.50
8.2.170.0150.00622.96
8.2.160.0070.00720.44
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00522.20
8.2.110.0030.00622.08
8.2.100.0040.00717.91
8.2.90.0080.00019.17
8.2.80.0050.00317.97
8.2.70.0000.00817.60
8.2.60.0080.00017.93
8.2.50.0030.00618.07
8.2.40.0040.00419.88
8.2.30.0080.00018.15
8.2.20.0040.00417.58
8.2.10.0050.00318.13
8.2.00.0000.00817.66
8.1.280.0090.00925.92
8.1.270.0040.00422.02
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0000.00822.10
8.1.230.0080.00418.97
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.25
8.1.190.0040.00417.35
8.1.180.0000.00919.01
8.1.170.0080.00018.55
8.1.160.0070.00021.95
8.1.150.0040.00418.71
8.1.140.0040.00417.39
8.1.130.0000.00717.74
8.1.120.0050.00317.42
8.1.110.0030.00617.36
8.1.100.0000.00817.41
8.1.90.0040.00417.43
8.1.80.0040.00417.55
8.1.70.0070.00017.48
8.1.60.0030.00617.61
8.1.50.0080.00017.55
8.1.40.0040.00417.54
8.1.30.0080.00017.66
8.1.20.0040.00417.58
8.1.10.0090.00017.49
8.1.00.0000.00717.62
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0000.00718.37
8.0.270.0000.00717.23
8.0.260.0060.00017.21
8.0.250.0030.00617.01
8.0.240.0050.00317.02
8.0.230.0000.00716.85
8.0.220.0030.00316.92
8.0.210.0070.00016.88
8.0.200.0000.00716.86
8.0.190.0040.00416.97
8.0.180.0040.00416.93
8.0.170.0050.00316.86
8.0.160.0030.00316.79
8.0.150.0000.00716.71
8.0.140.0000.01516.78
8.0.130.0030.00313.30
8.0.120.0030.00516.93
8.0.110.0040.00416.97
8.0.100.0000.01016.84
8.0.90.0080.00016.87
8.0.80.0110.00616.96
8.0.70.0070.00016.75
8.0.60.0000.00817.03
8.0.50.0080.00016.94
8.0.30.0100.01117.11
8.0.20.0060.01217.40
8.0.10.0050.00316.89
8.0.00.0090.00916.73
7.4.330.0020.00215.00
7.4.320.0000.00716.50
7.4.300.0000.00916.64
7.4.290.0030.00316.57
7.4.280.0060.00316.48
7.4.270.0000.00716.58
7.4.260.0030.00316.63
7.4.250.0040.00416.47
7.4.240.0020.00516.45
7.4.230.0040.00416.46
7.4.220.0110.00716.69
7.4.210.0090.00716.56
7.4.200.0030.00316.38
7.4.190.0000.00716.57
7.4.160.0120.00416.44
7.4.150.0120.00617.40
7.4.140.0080.01417.86
7.4.130.0110.00816.55
7.4.120.0100.00816.47
7.4.110.0100.00716.61
7.4.100.0120.00616.51
7.4.90.0030.01516.76
7.4.80.0070.01119.39
7.4.70.0060.01216.63
7.4.60.0000.01616.48
7.4.50.0000.00816.38
7.4.40.0060.01416.65
7.4.30.0100.00716.50
7.4.00.0080.00815.07
7.3.330.0000.00513.30
7.3.320.0060.00013.27
7.3.310.0030.00316.20
7.3.300.0000.00716.30
7.3.290.0100.01016.29
7.3.280.0110.00716.35
7.3.270.0130.00417.40
7.3.260.0030.01616.59
7.3.250.0080.00816.31
7.3.240.0100.01016.61
7.3.230.0130.00316.39
7.3.210.0130.00316.39
7.3.200.0030.01419.39
7.3.190.0100.01316.50
7.3.180.0090.00616.34
7.3.170.0160.00516.39
7.3.160.0100.00616.35
7.3.120.0070.01114.96
7.3.110.0030.01615.04
7.3.100.0070.00714.85
7.3.90.0070.00714.90
7.3.80.0060.00314.94
7.3.70.0040.01214.72
7.3.60.0000.01114.75
7.3.50.0070.00714.51
7.3.40.0060.00614.65
7.3.30.0070.00714.89
7.3.20.0100.00316.67
7.3.10.0000.00816.45
7.3.00.0040.00816.82
7.2.330.0130.01016.81
7.2.320.0120.00916.78
7.2.310.0100.00716.74
7.2.300.0140.00316.86
7.2.290.0060.01216.88
7.2.250.0030.01514.73
7.2.240.0060.01014.67
7.2.230.0060.01015.21
7.2.220.0030.01215.00
7.2.210.0060.00915.22
7.2.200.0080.00415.08
7.2.190.0110.00314.75
7.2.180.0030.01215.13
7.2.170.0030.01315.16
7.2.00.0040.00819.48
7.1.330.0040.01115.77
7.1.320.0110.00315.89
7.1.310.0070.00615.69
7.1.300.0040.00815.96
7.1.290.0060.00315.77
7.1.280.0070.00315.84
7.1.270.0040.00815.67
7.1.260.0090.00615.86
7.1.100.0000.01218.16
7.1.70.0070.00317.23
7.1.60.0100.01019.46
7.1.50.0080.01416.96
7.1.00.0030.07322.57
7.0.200.0030.00716.73
7.0.140.0030.07022.07
7.0.80.0130.03719.92
7.0.70.0200.08720.01
7.0.60.0230.06719.96
7.0.50.0370.07320.33
7.0.40.0070.04320.11
7.0.30.0030.04320.03
7.0.20.0000.04020.18
7.0.10.0170.03320.00
7.0.00.0000.03720.10
5.6.280.0100.06321.13
5.6.230.0070.05020.63
5.6.220.0070.07720.57
5.6.210.0070.08320.47
5.6.200.0070.06021.02
5.6.190.0100.07021.05
5.6.180.0100.03720.96
5.6.170.0070.03321.07
5.6.160.0030.04321.12
5.6.150.0070.03021.07
5.6.140.0030.04021.09
5.6.130.0070.06021.03
5.6.120.0100.03721.06
5.6.110.0000.04721.13
5.6.100.0070.04021.10
5.6.90.0070.04021.01
5.6.80.0070.04020.47
5.6.70.0100.05720.45
5.6.60.0030.04020.48
5.6.50.0030.03720.44
5.6.40.0000.04720.42
5.6.30.0070.03720.39
5.6.20.0000.04320.53
5.6.10.0070.03720.31
5.6.00.0100.03020.30
5.5.370.0070.04320.36
5.5.360.0100.07720.36
5.5.350.0000.06320.48
5.5.340.0070.06720.91
5.5.330.0070.04020.79
5.5.320.0070.03720.82
5.5.310.0000.04320.89
5.5.300.0030.04020.92
5.5.290.0000.07720.84
5.5.280.0000.06320.81
5.5.270.0070.04020.88
5.5.260.0070.03320.73
5.5.250.0000.04320.56
5.5.240.0100.04020.30
5.5.230.0000.04320.12
5.5.220.0070.04320.29
5.5.210.0070.07320.26
5.5.200.0000.04720.10
5.5.190.0070.03720.27
5.5.180.0070.04020.18
5.5.160.0070.04320.10
5.5.150.0070.03720.25
5.5.140.0000.03720.16
5.5.130.0000.04320.28
5.5.120.0070.03320.14
5.5.110.0070.03720.12
5.5.100.0070.03720.06
5.5.90.0170.02720.14
5.5.80.0070.03020.18
5.5.70.0130.06719.95
5.5.60.0100.07720.06
5.5.50.0030.08019.98
5.5.40.0070.08320.01
5.5.30.0130.07320.05
5.5.20.0170.03719.95
5.5.10.0100.04320.01
5.5.00.0070.08020.02
5.4.450.0030.04019.48
5.4.440.0000.04719.36
5.4.430.0030.04719.17
5.4.420.0070.07319.27
5.4.410.0030.05719.24
5.4.400.0000.04018.88
5.4.390.0000.04019.05
5.4.380.0000.04019.18
5.4.370.0030.04019.21
5.4.360.0100.04719.03
5.4.350.0070.03318.85
5.4.340.0070.03319.03
5.4.320.0100.03718.88
5.4.310.0100.02718.85
5.4.300.0070.03019.03
5.4.290.0030.03719.13
5.4.280.0030.03718.87
5.4.270.0000.05019.03
5.4.260.0000.04719.09
5.4.250.0030.03719.09
5.4.240.0070.07319.04
5.4.230.0130.06719.09
5.4.220.0100.07018.84
5.4.210.0100.07019.17
5.4.200.0030.07719.16
5.4.190.0030.08018.99
5.4.180.0170.06719.03
5.4.170.0000.05019.08
5.4.160.0070.04719.02
5.4.150.0000.07718.93
5.4.140.0100.03716.49
5.4.130.0070.07716.46
5.4.120.0070.07016.52
5.4.110.0000.06716.43
5.4.100.0070.06316.49
5.4.90.0030.07716.56
5.4.80.0100.06716.47
5.4.70.0000.07716.47
5.4.60.0070.07016.36
5.4.50.0100.07016.50
5.4.40.0100.07016.53
5.4.30.0070.06316.46
5.4.20.0070.08016.41
5.4.10.0100.03016.47
5.4.00.0100.03315.91
5.3.290.0070.03714.60
5.3.280.0100.07714.61
5.3.270.0030.04014.70
5.3.260.0030.06714.70
5.3.250.0070.07314.68
5.3.240.0070.04014.73
5.3.230.0070.08014.52
5.3.220.0070.07014.53
5.3.210.0070.07014.55
5.3.200.0030.04014.60
5.3.190.0100.07314.57
5.3.180.0030.05714.50
5.3.170.0070.03714.59
5.3.160.0030.05314.58
5.3.150.0130.07314.57
5.3.140.0100.07714.58
5.3.130.0130.07014.54
5.3.120.0070.04714.57
5.3.110.0100.04714.61
5.3.100.0170.06314.10
5.3.90.0030.07314.10
5.3.80.0130.06714.10
5.3.70.0070.07314.10
5.3.60.0030.08014.10
5.3.50.0070.07714.10
5.3.40.0030.06314.10
5.3.30.0070.06714.10
5.3.20.0100.06714.10
5.3.10.0070.03314.10
5.3.00.0100.05714.10
5.2.170.0100.05314.10
5.2.160.0070.02714.10
5.2.150.0030.05014.10
5.2.140.0070.05014.10
5.2.130.0070.05714.10
5.2.120.0000.04014.10
5.2.110.0030.06314.10
5.2.100.0000.06714.10
5.2.90.0030.03314.10
5.2.80.0070.02714.10
5.2.70.0030.03314.10
5.2.60.0070.06014.10
5.2.50.0030.05714.10
5.2.40.0030.03014.10
5.2.30.0100.05714.10
5.2.20.0070.06014.10
5.2.10.0000.05014.10
5.2.00.0000.02714.10
5.1.60.0070.01714.10
5.1.50.0030.05014.10
5.1.40.0070.04314.10
5.1.30.0030.05714.10
5.1.20.0070.04014.10
5.1.10.0030.03314.10
5.1.00.0070.04714.10
5.0.50.0070.03314.10
5.0.40.0000.02314.10
5.0.30.0070.05314.10
5.0.20.0070.04014.10
5.0.10.0100.02014.10
5.0.00.0030.06714.10
4.4.90.0070.02014.10
4.4.80.0000.02014.10
4.4.70.0030.02314.10
4.4.60.0170.00714.10
4.4.50.0030.03314.10
4.4.40.0070.03314.10
4.4.30.0000.03714.10
4.4.20.0030.02314.10
4.4.10.0000.02014.10
4.4.00.0070.03314.10
4.3.110.0030.03014.10
4.3.100.0000.02314.10
4.3.90.0030.01714.10
4.3.80.0100.03014.10
4.3.70.0070.02714.10
4.3.60.0030.02314.10
4.3.50.0000.03714.10
4.3.40.0030.05014.10
4.3.30.0000.03714.10
4.3.20.0030.02014.10
4.3.10.0000.02014.10
4.3.00.0000.03714.10

preferences:
52.96 ms | 401 KiB | 5 Q