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 = $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.60.0070.01016.63
8.3.50.0100.01221.99
8.3.40.0070.01118.67
8.3.30.0060.01019.16
8.3.20.0040.00420.09
8.3.10.0050.00323.48
8.3.00.0040.00419.00
8.2.180.0100.00518.51
8.2.170.0100.00722.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0030.00521.87
8.2.110.0050.00522.07
8.2.100.0040.00719.64
8.2.90.0090.00019.13
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00518.05
8.2.50.0050.00318.07
8.2.40.0000.00920.00
8.2.30.0000.00718.34
8.2.20.0040.00417.61
8.2.10.0000.00717.95
8.2.00.0040.00417.82
8.1.280.0060.01025.92
8.1.270.0080.00022.19
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0030.00623.91
8.1.230.0110.00018.96
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0050.00317.00
8.1.180.0030.00619.01
8.1.170.0050.00318.45
8.1.160.0040.00421.85
8.1.150.0000.00818.65
8.1.140.0040.00417.40
8.1.130.0040.00417.77
8.1.120.0000.00717.34
8.1.110.0000.01017.38
8.1.100.0030.00417.32
8.1.90.0030.00517.42
8.1.80.0070.00017.42
8.1.70.0030.00517.34
8.1.60.0040.00417.61
8.1.50.0000.00917.46
8.1.40.0000.00917.57
8.1.30.0030.00617.74
8.1.20.0000.00717.55
8.1.10.0030.00617.49
8.1.00.0000.00817.51
8.0.300.0000.00718.77
8.0.290.0080.00017.04
8.0.280.0000.00718.33
8.0.270.0030.00317.27
8.0.260.0000.00617.26
8.0.250.0000.00716.82
8.0.240.0000.00816.84
8.0.230.0000.00716.94
8.0.220.0050.00216.86
8.0.210.0050.00216.93
8.0.200.0030.00316.88
8.0.190.0040.00416.94
8.0.180.0000.00716.96
8.0.170.0000.00816.82
8.0.160.0000.00716.90
8.0.150.0070.00016.90
8.0.140.0040.00416.77
8.0.130.0000.00613.34
8.0.120.0090.00016.89
8.0.110.0000.00716.73
8.0.100.0040.00416.98
8.0.90.0000.00816.95
8.0.80.0150.00616.84
8.0.70.0040.00416.97
8.0.60.0020.00516.87
8.0.50.0000.00716.97
8.0.30.0150.00917.34
8.0.20.0080.01017.40
8.0.10.0040.00416.96
8.0.00.0040.01716.81
7.4.330.0000.00515.00
7.4.320.0070.00016.57
7.4.300.0030.00316.51
7.4.290.0070.00016.52
7.4.280.0030.00316.59
7.4.270.0050.00316.42
7.4.260.0030.00316.42
7.4.250.0040.00416.59
7.4.240.0040.00416.60
7.4.230.0070.00016.36
7.4.220.0030.01716.66
7.4.210.0090.00516.55
7.4.200.0000.00716.71
7.4.190.0030.00316.59
7.4.160.0160.00416.55
7.4.150.0160.00017.40
7.4.140.0080.01017.86
7.4.130.0130.00916.52
7.4.120.0120.01016.67
7.4.110.0130.00616.74
7.4.100.0080.01116.29
7.4.90.0030.01316.52
7.4.80.0150.00919.39
7.4.70.0060.01016.42
7.4.60.0070.01116.58
7.4.50.0040.00416.32
7.4.40.0120.00916.42
7.4.30.0090.00916.54
7.4.00.0090.00615.02
7.3.330.0020.00213.04
7.3.320.0050.00013.00
7.3.310.0050.00316.37
7.3.300.0030.00316.13
7.3.290.0060.00916.20
7.3.280.0050.01116.22
7.3.270.0110.01517.40
7.3.260.0090.00916.35
7.3.250.0110.00916.36
7.3.240.0160.00316.54
7.3.230.0140.00316.39
7.3.210.0070.01116.32
7.3.200.0040.01519.39
7.3.190.0210.00016.23
7.3.180.0070.01016.51
7.3.170.0070.01016.55
7.3.160.0070.01016.45
7.3.120.0030.01414.95
7.2.330.0070.01016.43
7.2.320.0040.01516.72
7.2.310.0070.01116.77
7.2.300.0030.01316.86
7.2.290.0120.00616.41
7.1.70.0100.00717.14
7.1.60.0070.01619.46
7.1.50.0060.01016.63
7.1.00.0100.06722.35
7.0.200.0030.00316.76
7.0.140.0000.07722.06
7.0.60.0030.09019.87
7.0.50.0100.04317.80
7.0.40.0070.04719.96
7.0.30.0230.07020.23
7.0.20.0300.06720.21
7.0.10.0000.09020.09
7.0.00.0100.07020.17
5.6.280.0030.07321.16
5.6.210.0030.04320.68
5.6.200.0100.03318.25
5.6.190.0030.05320.64
5.6.180.0530.06020.55
5.6.170.0230.03320.71
5.6.160.0030.07320.50
5.6.150.0070.07318.27
5.6.140.0000.09018.19
5.6.130.0070.08318.14
5.6.120.0030.05021.02
5.6.110.0100.04020.90
5.6.100.0070.07021.02
5.6.90.0100.06021.14
5.6.80.0000.04320.39
5.5.350.4300.04020.39
5.5.340.0030.08318.07
5.5.330.0000.05020.19
5.5.320.0330.04020.20
5.5.310.0130.04020.35
5.5.300.0130.06318.01
5.5.290.0100.07018.07
5.5.280.0130.07720.78
5.5.270.0030.05320.77
5.5.260.0030.07720.85
5.5.250.0030.04020.71
5.5.240.0070.07720.20
5.4.450.0730.06719.45
5.4.440.0600.07719.39
5.4.430.0100.06719.64
5.4.420.0230.06019.23
5.4.410.0100.05319.10
5.4.400.0130.07019.27
5.4.390.0170.06718.96
5.4.380.0200.04718.74
5.4.370.0200.04718.57
5.4.360.0130.05018.86
5.4.350.0300.03718.52
5.4.340.0170.05318.79
5.4.320.0060.03812.52
5.4.310.0070.04112.52
5.4.300.0050.04712.53
5.4.290.0080.05112.52
5.4.280.0100.04412.41
5.4.270.0070.03612.42
5.4.260.0070.04012.42
5.4.250.0090.03812.42
5.4.240.0080.03512.42
5.4.230.0070.04112.41
5.4.220.0140.05812.41
5.4.210.0070.05412.41
5.4.200.0060.04212.41
5.4.190.0130.05812.41
5.4.180.0100.05112.41
5.4.170.0100.05412.41
5.4.160.0070.05412.41
5.4.150.0140.04812.41
5.4.140.0070.05712.09
5.4.130.0060.04812.07
5.4.120.0100.03412.04
5.4.110.0090.03512.04
5.4.100.0100.04012.04
5.4.90.0080.05812.04
5.4.80.0150.07912.04
5.4.70.0070.04212.04
5.4.60.0070.04312.03
5.4.50.0120.03612.03
5.4.40.0100.03512.02
5.4.30.0070.04112.02
5.4.20.0150.06012.01
5.4.10.0060.04312.02
5.4.00.0070.04011.51
5.3.290.0050.04112.80
5.3.280.0090.04112.71
5.3.270.0130.05212.73
5.3.260.0120.07812.71
5.3.250.0100.05012.72
5.3.240.0190.07812.72
5.3.230.0180.04512.71
5.3.220.0120.04612.68
5.3.210.0190.06912.68
5.3.200.0110.07212.68
5.3.190.0060.05712.68
5.3.180.0070.04112.68
5.3.170.0130.04712.67
5.3.160.0120.04112.67
5.3.150.0090.04212.68
5.3.140.0130.03412.66
5.3.130.0070.04212.66
5.3.120.0080.04212.66
5.3.110.0100.05312.66
5.3.100.0090.05412.13
5.3.90.0090.05512.11
5.3.80.0130.06712.09
5.3.70.0120.06012.09
5.3.60.0120.06412.08
5.3.50.0120.04912.04
5.3.40.0160.04612.04
5.3.30.0070.05211.99
5.3.20.0120.04611.78
5.3.10.0150.04511.73
5.3.00.0230.07911.72
5.2.170.0100.0389.23
5.2.160.0060.0359.23
5.2.150.0040.0339.23
5.2.140.0050.0359.22
5.2.130.0070.0379.19
5.2.120.0080.0309.18
5.2.110.0110.0389.20
5.2.100.0080.0499.18
5.2.90.0120.0479.19
5.2.80.0160.0459.19
5.2.70.0070.0459.19
5.2.60.0060.0419.13
5.2.50.0100.0389.10
5.2.40.0050.0359.07
5.2.30.0060.0319.06
5.2.20.0090.0349.04
5.2.10.0080.0468.95
5.2.00.0060.0478.82
5.1.60.0050.0388.09
5.1.50.0080.0248.09
5.1.40.0050.0278.07
5.1.30.0070.0298.43
5.1.20.0080.0288.45
5.1.10.0090.0288.17
5.1.00.0080.0238.17
5.0.50.0040.0216.65
5.0.40.0030.0206.51
5.0.30.0020.0336.32
5.0.20.0050.0206.28
5.0.10.0040.0236.26
5.0.00.0060.0336.26
4.4.90.0060.0144.78
4.4.80.0020.0164.75
4.4.70.0040.0144.75
4.4.60.0040.0154.76
4.4.50.0030.0174.77
4.4.40.0030.0314.71
4.4.30.0050.0254.76
4.4.20.0070.0174.85
4.4.10.0040.0204.85
4.4.00.0020.0304.76
4.3.110.0040.0154.66
4.3.100.0030.0204.66
4.3.90.0060.0194.64
4.3.80.0060.0324.59
4.3.70.0040.0214.63
4.3.60.0090.0324.63
4.3.50.0040.0194.63
4.3.40.0020.0464.53
4.3.30.0020.0223.30
4.3.20.0010.0253.28
4.3.10.0030.0303.23
4.3.00.0170.0177.36

preferences:
45.77 ms | 401 KiB | 5 Q