3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct($decorated) { $this->decorated = $decorated; } public function __call($method, $args) { $decorated = array_filter($args, function($arg) { return ($arg instanceof Decorated); })[0]; $response = call_user_func_array( array($this->service, $method), $args ); return $response; } } class Decorated { public function doSomething() { return 'did something'; } } $x = new Decorated; $t = new Test($x); $response = $t->doSomething(); echo $response;

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.0150.00618.40
8.3.50.0130.00722.03
8.3.40.0100.00718.65
8.3.30.0070.00719.04
8.3.20.0040.00420.17
8.3.10.0080.00021.90
8.3.00.0040.00417.89
8.2.180.0070.00716.75
8.2.170.0140.00022.96
8.2.160.0130.00320.30
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0040.00420.90
8.2.110.0050.00519.19
8.2.100.0040.00819.34
8.2.90.0030.00517.88
8.2.80.0050.00317.97
8.2.70.0030.00518.05
8.2.60.0050.00318.03
8.2.50.0080.00018.10
8.2.40.0000.00821.02
8.2.30.0000.00820.70
8.2.20.0080.00017.70
8.2.10.0040.00418.06
8.2.00.0070.00017.86
8.1.280.0090.01225.92
8.1.270.0070.00723.87
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0000.01217.48
8.1.230.0090.00317.76
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0050.00517.36
8.1.190.0030.00519.01
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0030.00518.91
8.1.150.0000.00718.91
8.1.140.0000.00817.52
8.1.130.0000.00817.85
8.1.120.0040.00417.56
8.1.110.0030.00617.48
8.1.100.0040.00417.41
8.1.90.0030.00317.49
8.1.80.0040.00417.52
8.1.70.0030.00317.47
8.1.60.0000.00917.64
8.1.50.0050.00417.59
8.1.40.0030.00517.56
8.1.30.0060.00317.72
8.1.20.0000.00717.55
8.1.10.0040.00417.62
8.1.00.0050.00217.44
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0040.00418.48
8.0.270.0050.00317.18
8.0.260.0060.00017.20
8.0.250.0030.00317.06
8.0.240.0030.00317.01
8.0.230.0040.00417.08
8.0.220.0070.00016.84
8.0.210.0080.00017.02
8.0.200.0060.00316.93
8.0.190.0000.00716.93
8.0.180.0000.00716.92
8.0.170.0040.00416.89
8.0.160.0070.00016.91
8.0.150.0040.00416.77
8.0.140.0040.00416.93
8.0.130.0060.00013.36
8.0.120.0050.00316.95
8.0.110.0040.00416.88
8.0.100.0040.00417.08
8.0.90.0030.00516.86
8.0.80.0000.01617.03
8.0.70.0020.00517.02
8.0.60.0020.00516.87
8.0.50.0040.00417.03
8.0.30.0050.01417.12
8.0.20.0090.01017.40
8.0.10.0040.00417.04
8.0.00.0110.01216.82
7.4.330.0030.00315.05
7.4.320.0030.00316.59
7.4.300.0000.00616.56
7.4.290.0070.00016.52
7.4.280.0000.00816.40
7.4.270.0050.00216.51
7.4.260.0040.00416.55
7.4.250.0080.00016.58
7.4.240.0010.00616.50
7.4.230.0070.00016.64
7.4.220.0000.01716.55
7.4.210.0030.01016.63
7.4.200.0000.00716.45
7.4.160.0100.00616.48
7.4.150.0040.01517.40
7.4.140.0150.00217.86
7.4.130.0110.01416.68
7.4.120.0070.01016.55
7.4.110.0030.01416.41
7.4.100.0130.01016.72
7.4.90.0030.01616.61
7.4.80.0060.01219.39
7.4.70.0060.01216.54
7.4.60.0030.01516.58
7.4.50.0030.00316.33
7.4.40.0130.00316.40
7.4.30.0110.00516.45
7.4.00.0120.00414.78
7.3.330.0050.00213.39
7.3.320.0000.00513.43
7.3.310.0030.00316.29
7.3.300.0030.00316.48
7.3.290.0160.00016.35
7.3.280.0100.01016.43
7.3.270.0110.00617.40
7.3.260.0040.01516.61
7.3.240.0070.01016.42
7.3.230.0110.00716.39
7.3.210.0110.00616.37
7.3.200.0170.00019.39
7.3.190.0030.00416.43
7.3.180.0070.01416.59
7.3.170.0090.00916.46
7.3.160.0030.01316.39
7.3.120.0040.01114.94
7.2.330.0030.01616.47
7.2.320.0040.01216.77
7.2.310.0060.01616.77
7.2.300.0080.00816.80
7.2.290.0100.00716.74
7.2.60.0190.00716.86
7.2.50.0070.00716.91
7.2.00.0030.01019.46
7.1.200.0030.00615.77
7.1.100.0040.00818.23
7.1.70.0060.00317.28
7.1.60.0130.01019.25
7.1.50.0000.02117.06
7.1.00.0100.07022.43
7.0.200.0000.00716.46
7.0.140.0000.07721.97
7.0.60.0100.06020.07
7.0.50.0100.06717.81
7.0.40.0100.06720.40
7.0.30.0230.04020.16
7.0.20.0300.08020.07
7.0.10.0030.09320.12
7.0.00.0030.06320.30
5.6.280.0000.07720.87
5.6.210.0070.03720.55
5.6.200.0130.07718.14
5.6.190.0000.04720.33
5.6.180.0230.08020.61
5.6.170.0270.03720.57
5.6.160.0030.04720.44
5.6.150.0100.07318.27
5.6.140.0100.03718.23
5.6.130.0030.04318.15
5.6.120.0030.04721.09
5.6.110.0000.04321.13
5.6.100.0130.05721.12
5.6.90.0030.05020.96
5.6.80.0100.07320.48
5.5.350.0000.08720.39
5.5.340.0100.04718.09
5.5.330.0070.04020.27
5.5.320.0430.06020.42
5.5.310.0300.07720.34
5.5.300.0030.04018.02
5.5.290.0230.06718.04
5.5.280.0100.08020.91
5.5.270.0030.07720.74
5.5.260.0070.08720.79
5.5.250.0070.08320.55
5.5.240.0300.07020.05
5.4.450.0230.07019.41
5.4.440.0200.04319.53
5.4.430.0100.05319.54
5.4.420.0230.03319.19
5.4.410.0200.03319.54
5.4.400.0170.05019.09
5.4.390.0300.07318.85
5.4.380.0370.06019.13
5.4.370.0170.07318.97
5.4.360.0230.06319.25
5.4.350.0230.03319.06
5.4.340.0270.06319.26
5.4.320.0200.06018.88
5.4.310.0200.07019.23
5.4.300.0330.06719.05
5.4.290.0300.07019.06
5.4.280.0230.07319.20
5.4.270.0170.07019.00
5.4.260.0230.07319.15
5.4.250.0230.04319.15
5.4.240.0170.04719.14
5.4.230.0130.08018.99
5.4.220.0270.06319.07
5.4.210.0230.04019.21
5.4.200.0330.06719.18
5.4.190.0230.05019.21
5.4.180.0230.05719.21
5.4.170.0230.06719.15
5.4.160.0230.07719.22
5.4.150.0200.06718.93
5.4.140.0270.06316.34
5.4.130.0230.06316.56
5.4.120.0330.06316.46
5.4.110.0170.04316.24
5.4.100.0200.07016.23
5.4.90.0230.06016.59
5.4.80.0270.05716.48
5.4.70.0270.06716.59
5.4.60.0230.06716.33
5.4.50.0200.06716.51
5.4.40.0270.07016.56
5.4.30.0200.07716.43
5.4.20.0370.06016.42
5.4.10.0370.06716.53
5.4.00.0200.06315.96
5.3.290.0170.06014.57
5.3.280.0270.07014.83
5.3.270.0130.04714.54
5.3.260.0300.06714.58
5.3.250.0330.06314.62
5.3.240.0230.07014.69
5.3.230.0230.06714.57
5.3.220.0270.06714.58
5.3.210.0200.05714.48
5.3.200.0330.06014.58
5.3.190.0230.05314.47
5.3.180.0300.06314.59
5.3.170.0270.04714.61
5.3.160.0200.06714.47
5.3.150.0300.05314.66
5.3.140.0200.05014.64
5.3.130.0200.03714.48
5.3.120.0200.05314.61
5.3.110.0100.05714.71
5.3.100.0200.07314.02
5.3.90.0170.06314.25
5.3.80.0270.06714.03
5.3.70.0330.04714.11
5.3.60.0200.04313.95
5.3.50.0230.04013.96
5.3.40.0230.04713.96
5.3.30.0270.07013.82
5.3.20.0230.04713.61
5.3.10.0270.04013.74
5.3.00.0200.07013.65
5.2.170.0230.05012.43
5.2.160.0130.04012.43
5.2.150.0130.04012.43
5.2.140.0170.03312.43
5.2.130.0200.05012.43
5.2.120.0200.03012.43
5.2.110.0170.05712.43
5.2.100.0170.06012.43
5.2.90.0300.05012.43
5.2.80.0170.06012.43
5.2.70.0300.05312.43
5.2.60.0130.06012.43
5.2.50.0200.02712.43
5.2.40.0130.06312.43
5.2.30.0230.05312.43
5.2.20.0070.04712.43
5.2.10.0030.03312.43
5.2.00.0100.02712.43
5.1.60.0170.02312.43
5.1.50.0170.02012.43
5.1.40.0130.02012.43
5.1.30.0070.02712.43
5.1.20.0070.03312.43
5.1.10.0100.02312.43
5.1.00.0130.02312.43
5.0.50.0100.02012.43
5.0.40.0030.02012.43
5.0.30.0030.03312.43
5.0.20.0030.02012.43
5.0.10.0000.02312.43
5.0.00.0030.03012.43
4.4.90.0070.03712.43
4.4.80.0030.02312.43
4.4.70.0030.04312.43
4.4.60.0070.02012.43
4.4.50.0000.02312.43
4.4.40.0100.03012.43
4.4.30.0030.01712.43
4.4.20.0070.01312.43
4.4.10.0030.01712.43
4.4.00.0030.02712.43
4.3.110.0070.01312.43
4.3.100.0070.01312.43
4.3.90.0070.01312.43
4.3.80.0030.03012.43
4.3.70.0070.01712.43
4.3.60.0070.01312.43
4.3.50.0030.01712.43
4.3.40.0030.02312.43
4.3.30.0000.01712.43
4.3.20.0030.01712.43
4.3.10.0000.02012.43
4.3.00.0000.01712.43

preferences:
54.61 ms | 400 KiB | 5 Q