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); }); $response = call_user_func_array( array($this->decorated, $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.0070.00718.55
8.3.50.0250.00521.98
8.3.40.0120.00419.02
8.3.30.0100.00319.07
8.3.20.0040.00420.34
8.3.10.0040.00421.85
8.3.00.0080.00017.93
8.2.180.0120.00318.66
8.2.170.0090.00622.96
8.2.160.0120.00320.45
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00321.05
8.2.110.0030.00622.08
8.2.100.0000.01219.70
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0060.00317.36
8.2.60.0000.00817.80
8.2.50.0030.00618.07
8.2.40.0040.00419.84
8.2.30.0060.00318.13
8.2.20.0000.00717.66
8.2.10.0000.00718.12
8.2.00.0030.00517.75
8.1.280.0140.00425.92
8.1.270.0030.01223.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0070.00419.18
8.1.220.0040.00417.74
8.1.210.0050.00518.77
8.1.200.0030.00717.35
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0080.00018.59
8.1.160.0070.00022.07
8.1.150.0020.00518.81
8.1.140.0000.00717.33
8.1.130.0030.00317.84
8.1.120.0000.00817.53
8.1.110.0000.00717.46
8.1.100.0000.00817.36
8.1.90.0040.00417.36
8.1.80.0030.00417.50
8.1.70.0070.00017.35
8.1.60.0060.00317.44
8.1.50.0000.00817.43
8.1.40.0100.00017.42
8.1.30.0030.00617.55
8.1.20.0000.00717.56
8.1.10.0050.00317.46
8.1.00.0000.00717.39
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0030.00318.44
8.0.270.0070.00017.18
8.0.260.0030.00317.31
8.0.250.0070.00017.05
8.0.240.0030.00316.95
8.0.230.0000.00817.03
8.0.220.0000.00816.79
8.0.210.0000.00816.82
8.0.200.0030.00616.96
8.0.190.0030.00316.91
8.0.180.0050.00216.82
8.0.170.0040.00416.92
8.0.160.0000.00716.96
8.0.150.0050.00216.91
8.0.140.0040.00416.88
8.0.130.0050.00013.36
8.0.120.0030.00516.73
8.0.110.0030.00616.84
8.0.100.0070.00016.81
8.0.90.0000.00716.78
8.0.80.0110.00416.88
8.0.70.0070.00016.89
8.0.60.0030.00616.82
8.0.50.0040.00416.71
8.0.30.0120.00617.17
8.0.20.0120.01117.40
8.0.10.0000.00816.83
8.0.00.0120.00516.99
7.4.330.0000.00515.01
7.4.320.0030.00316.64
7.4.300.0050.00216.65
7.4.290.0030.00316.61
7.4.280.0050.00216.35
7.4.270.0000.00716.51
7.4.260.0000.00716.50
7.4.250.0050.00316.43
7.4.240.0000.00716.46
7.4.230.0000.00716.30
7.4.220.0070.01016.63
7.4.210.0100.00316.63
7.4.200.0070.00016.35
7.4.160.0100.00716.34
7.4.150.0110.00817.40
7.4.140.0100.01017.86
7.4.130.0130.01016.33
7.4.120.0110.00616.66
7.4.110.0100.00716.63
7.4.100.0130.00516.54
7.4.90.0060.01616.48
7.4.80.0130.00319.39
7.4.70.0100.00616.63
7.4.60.0070.01016.54
7.4.50.0000.00816.45
7.4.40.0090.00716.63
7.4.30.0000.01616.41
7.4.00.0000.01414.90
7.3.330.0000.00613.32
7.3.320.0030.00313.24
7.3.310.0070.00016.34
7.3.300.0000.00716.35
7.3.290.0130.00716.32
7.3.280.0060.01316.30
7.3.270.0060.01517.40
7.3.260.0060.01216.63
7.3.240.0070.01116.24
7.3.230.0070.01016.40
7.3.210.0060.01016.35
7.3.200.0120.00419.39
7.3.190.0120.01316.48
7.3.180.0110.00716.55
7.3.170.0150.00016.27
7.3.160.0030.01216.34
7.3.120.0070.00714.86
7.2.330.0150.00916.84
7.2.320.0060.01016.69
7.2.310.0110.00516.63
7.2.300.0030.01316.63
7.2.290.0030.01416.60
7.2.00.0030.01319.34
7.1.100.0040.00818.09
7.1.70.0050.00317.16
7.1.60.0130.01019.25
7.1.50.0040.01817.02
7.1.00.0070.06722.48
7.0.200.0000.00716.73
7.0.140.0000.07722.07
7.0.60.0030.08319.92
7.0.50.0170.07317.87
7.0.40.0030.04320.04
7.0.30.0230.04320.04
7.0.20.0300.07720.15
7.0.10.0000.05720.12
7.0.00.0100.09020.16
5.6.280.0000.07721.11
5.6.210.0070.07720.57
5.6.200.0130.07718.23
5.6.190.0070.08320.50
5.6.180.0170.04020.66
5.6.170.0270.05320.57
5.6.160.0070.05020.50
5.6.150.0000.04318.17
5.6.140.0170.06318.27
5.6.130.0000.07318.24
5.6.120.0030.06721.02
5.6.110.0170.07321.05
5.6.100.0030.04020.99
5.6.90.0130.07321.01
5.6.80.0100.06320.45
5.5.350.0200.03020.45
5.5.340.0100.07318.07
5.5.330.0070.03720.27
5.5.320.0130.06320.30
5.5.310.0370.07320.14
5.5.300.0070.08018.04
5.5.290.0070.05018.08
5.5.280.0230.07320.82
5.5.270.0130.04020.85
5.5.260.0100.05720.74
5.5.250.0030.04020.60
5.5.240.0000.08020.08
5.4.450.0100.05319.64
5.4.440.0030.08019.27
5.4.430.0070.06319.41
5.4.420.0100.07319.56
5.4.410.0030.05019.07
5.4.400.0030.04318.88
5.4.390.0030.05018.88
5.4.380.0230.05019.26
5.4.370.0000.05019.05
5.4.360.0070.04318.98
5.4.350.0070.07719.09
5.4.340.0070.07319.19
5.4.320.0100.08019.22
5.4.310.0000.07719.24
5.4.300.0000.07719.14
5.4.290.0100.04319.19
5.4.280.0100.06719.22
5.4.270.0000.05719.15
5.4.260.0030.07319.07
5.4.250.0030.07719.19
5.4.240.0130.03319.15
5.4.230.0070.03719.05
5.4.220.0070.07018.98
5.4.210.0100.07318.99
5.4.200.0030.08018.87
5.4.190.0070.05018.85
5.4.180.0030.04318.84
5.4.170.0030.08019.21
5.4.160.0070.07319.22
5.4.150.0070.08019.07
5.4.140.0000.07716.52
5.4.130.0000.07716.44
5.4.120.0070.05716.37
5.4.110.0070.06016.61
5.4.100.0030.06316.24
5.4.90.0030.04016.62
5.4.80.0100.04716.59
5.4.70.0070.07016.29
5.4.60.0070.06016.55
5.4.50.0030.07716.48
5.4.40.0100.06716.49
5.4.30.0000.06716.53
5.4.20.0070.06716.33
5.4.10.0100.05716.37
5.4.00.0030.07015.76
5.3.290.0030.07714.73
5.3.280.0000.04314.62
5.3.270.0000.08314.62
5.3.260.0030.05314.68
5.3.250.0070.04714.74
5.3.240.0100.06314.63
5.3.230.0000.07014.61
5.3.220.0000.05714.57
5.3.210.0100.07014.64
5.3.200.0030.06014.73
5.3.190.0000.05314.48
5.3.180.0000.09314.48
5.3.170.0030.07714.69
5.3.160.0030.05714.59
5.3.150.0000.07014.64
5.3.140.0030.05014.55
5.3.130.0000.07014.53
5.3.120.0100.06714.64
5.3.110.0000.05014.56
5.3.100.0070.05714.21
5.3.90.0000.08313.95
5.3.80.0070.07313.92
5.3.70.0070.07314.19
5.3.60.0030.07013.94
5.3.50.0030.06014.13
5.3.40.0070.06013.88
5.3.30.0000.07314.00
5.3.20.0000.06013.82
5.3.10.0070.07013.68
5.3.00.0000.07313.55
5.2.170.0030.05312.17
5.2.160.0070.04712.17
5.2.150.0100.04012.17
5.2.140.0000.06312.17
5.2.130.0000.06312.17
5.2.120.0070.05312.17
5.2.110.0000.05012.17
5.2.100.0030.06012.17
5.2.90.0030.04312.17
5.2.80.0000.05312.17
5.2.70.0000.07012.17
5.2.60.0130.03712.17
5.2.50.0070.06012.17
5.2.40.0030.06312.17
5.2.30.0030.05012.17
5.2.20.0000.05012.17
5.2.10.0070.05712.17
5.2.00.0070.05312.17
5.1.60.0170.03712.17
5.1.50.0030.04312.17
5.1.40.0000.04012.17
5.1.30.0070.05312.17
5.1.20.0000.05312.17
5.1.10.0030.06012.17
5.1.00.0000.04712.17
5.0.50.0000.05012.17
5.0.40.0000.03312.17
5.0.30.0070.06312.17
5.0.20.0030.04012.17
5.0.10.0070.02712.17
5.0.00.0000.04712.17
4.4.90.0070.02312.17
4.4.80.0030.03312.17
4.4.70.0000.03712.17
4.4.60.0000.03712.17
4.4.50.0000.03312.17
4.4.40.0000.04012.17
4.4.30.0000.02712.17
4.4.20.0030.02012.17
4.4.10.0000.02312.17
4.4.00.0000.04312.17
4.3.110.0000.02712.17
4.3.100.0000.03012.17
4.3.90.0030.03012.17
4.3.80.0000.05312.17
4.3.70.0000.01712.17
4.3.60.0000.02712.17
4.3.50.0030.03012.17
4.3.40.0070.04712.17
4.3.30.0030.03012.17
4.3.20.0030.02712.17
4.3.10.0000.03012.17
4.3.00.0030.03012.17

preferences:
60.44 ms | 401 KiB | 5 Q