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; }); var_dump($args); var_dump($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.70.0100.00716.63
8.3.60.0180.00318.43
8.3.50.0240.00721.93
8.3.40.0090.00918.71
8.3.30.0140.00019.04
8.3.20.0080.00020.34
8.3.10.0050.00321.91
8.3.00.0050.00317.93
8.2.180.0080.00818.38
8.2.170.0060.00822.96
8.2.160.0070.00720.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00921.00
8.2.110.0100.00021.10
8.2.100.0080.00417.91
8.2.90.0050.00519.56
8.2.80.0000.00819.34
8.2.70.0040.00417.50
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0040.00417.93
8.2.20.0040.00417.74
8.2.10.0020.00518.05
8.2.00.0020.00517.62
8.1.280.0090.00925.92
8.1.270.0040.00423.79
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0080.00322.44
8.1.230.0090.00321.11
8.1.220.0000.00817.74
8.1.210.0000.00818.84
8.1.200.0060.00317.48
8.1.190.0060.00317.64
8.1.180.0050.00318.10
8.1.170.0050.00318.89
8.1.160.0000.00818.90
8.1.150.0050.00218.89
8.1.140.0040.00417.46
8.1.130.0030.00317.80
8.1.120.0000.00817.48
8.1.110.0040.00417.34
8.1.100.0080.00017.46
8.1.90.0070.00017.43
8.1.80.0000.00717.37
8.1.70.0000.00717.36
8.1.60.0090.00017.48
8.1.50.0000.00817.54
8.1.40.0000.01117.41
8.1.30.0030.00517.65
8.1.20.0050.00217.58
8.1.10.0050.00217.54
8.1.00.0000.00717.41
8.0.300.0080.00020.03
8.0.290.0030.00516.75
8.0.280.0030.00318.41
8.0.270.0000.00916.76
8.0.260.0040.00417.29
8.0.250.0030.00316.90
8.0.240.0000.00616.86
8.0.230.0000.00616.93
8.0.220.0000.00716.79
8.0.210.0040.00416.75
8.0.200.0000.00917.02
8.0.190.0000.00716.98
8.0.180.0050.00316.91
8.0.170.0000.00816.79
8.0.160.0070.00016.85
8.0.150.0040.00416.89
8.0.140.0070.00016.84
8.0.130.0050.00013.32
8.0.120.0000.00816.73
8.0.110.0040.00416.75
8.0.100.0000.00816.93
8.0.90.0080.00016.89
8.0.80.0120.00316.93
8.0.70.0000.00716.84
8.0.60.0000.00716.91
8.0.50.0040.00416.69
8.0.30.0110.00817.11
8.0.20.0080.01117.40
8.0.10.0040.00416.92
8.0.00.0110.00616.78
7.4.330.0000.00515.08
7.4.320.0030.00516.53
7.4.300.0000.00616.46
7.4.290.0050.00316.40
7.4.280.0040.00416.47
7.4.270.0040.00416.50
7.4.260.0000.01116.35
7.4.250.0080.00016.39
7.4.240.0070.00016.47
7.4.230.0000.00716.53
7.4.220.0110.00616.57
7.4.210.0140.00016.55
7.4.200.0080.00016.63
7.4.160.0060.00916.41
7.4.150.0090.00917.40
7.4.140.0130.00517.86
7.4.130.0090.01016.57
7.4.120.0080.00916.43
7.4.110.0160.00016.62
7.4.100.0040.02116.43
7.4.90.0100.00716.47
7.4.80.0100.00719.39
7.4.70.0000.01716.48
7.4.60.0070.01016.37
7.4.50.0040.00416.23
7.4.40.0130.00316.33
7.4.30.0130.00316.68
7.4.00.0060.01015.22
7.3.330.0060.00013.13
7.3.320.0000.00513.31
7.3.310.0040.00416.36
7.3.300.0040.00416.17
7.3.290.0030.01016.27
7.3.280.0110.00616.31
7.3.270.0090.00917.40
7.3.260.0140.00316.29
7.3.250.0090.01116.48
7.3.240.0030.01516.31
7.3.230.0100.00716.39
7.3.210.0100.00616.68
7.3.200.0160.00319.39
7.3.190.0140.00816.30
7.3.180.0030.01316.25
7.3.170.0090.00616.32
7.3.160.0080.00816.36
7.3.120.0000.01514.80
7.2.330.0040.02116.64
7.2.320.0100.00716.79
7.2.310.0130.00416.69
7.2.300.0100.00716.77
7.2.290.0110.00716.28
7.2.00.0090.00619.44
7.1.100.0030.01017.88
7.1.70.0020.00517.08
7.1.60.0100.01419.25
7.1.50.0070.01016.70
7.1.00.0030.07722.28
7.0.200.0020.00516.88
7.0.140.0000.07722.10
7.0.60.0170.07320.06
7.0.50.0070.06717.92
7.0.40.0130.08020.28
7.0.30.0230.04320.14
7.0.20.0470.07320.08
7.0.10.0100.04720.19
7.0.00.0070.08320.10
5.6.280.0000.07721.03
5.6.210.0070.04720.68
5.6.200.0070.05318.19
5.6.190.0170.08020.48
5.6.180.0370.06720.52
5.6.170.0300.06720.44
5.6.160.0030.08720.55
5.6.150.0100.03318.14
5.6.140.0030.08018.15
5.6.130.0030.05018.13
5.6.120.0000.08720.96
5.6.110.0070.08721.14
5.6.100.0070.08321.00
5.6.90.0100.06320.89
5.6.80.0100.04020.44
5.5.350.4300.04320.47
5.5.340.0070.07717.98
5.5.330.0070.08020.29
5.5.320.0230.05020.31
5.5.310.0200.04020.36
5.5.300.0130.06717.95
5.5.290.0030.05317.98
5.5.280.0100.07720.88
5.5.270.0130.08020.90
5.5.260.0030.09020.98
5.5.250.0070.05020.63
5.5.240.0030.05320.05
5.4.450.0170.04319.42
5.4.440.0130.05319.30
5.4.430.1070.05019.32
5.4.420.0170.05019.54
5.4.410.0400.04719.27
5.4.400.0130.03318.96
5.4.390.0330.03319.06
5.4.380.0170.05318.65
5.4.370.0130.05318.48
5.4.360.0100.05318.54
5.4.350.0070.06018.68
5.4.340.0170.05018.48
5.4.320.0060.04812.51
5.4.310.0050.04212.50
5.4.300.0040.04012.51
5.4.290.0080.03612.50
5.4.280.0070.05012.41
5.4.270.0060.04012.40
5.4.260.0070.03712.40
5.4.250.0050.04412.40
5.4.240.0080.03512.41
5.4.230.0080.03612.39
5.4.220.0030.03912.39
5.4.210.0040.03712.39
5.4.200.0100.03412.39
5.4.190.0060.04112.39
5.4.180.0090.03412.39
5.4.170.0070.03512.40
5.4.160.0070.03512.40
5.4.150.0040.03812.39
5.4.140.0030.04012.08
5.4.130.0060.03512.06
5.4.120.0050.03812.03
5.4.110.0070.03612.02
5.4.100.0070.03312.02
5.4.90.0060.03612.02
5.4.80.0120.03912.02
5.4.70.0090.04812.02
5.4.60.0070.04112.02
5.4.50.0050.03712.02
5.4.40.0070.04012.00
5.4.30.0120.03112.00
5.4.20.0070.03512.00
5.4.10.0100.03412.00
5.4.00.0080.04711.49
5.3.290.0070.03812.80
5.3.280.0140.04712.71
5.3.270.0100.05412.72
5.3.260.0070.04512.71
5.3.250.0070.04712.72
5.3.240.0050.04112.72
5.3.230.0050.04112.71
5.3.220.0090.03712.68
5.3.210.0080.04012.68
5.3.200.0130.04712.68
5.3.190.0050.03912.68
5.3.180.0110.04012.68
5.3.170.0040.03912.67
5.3.160.0070.03612.67
5.3.150.0080.03712.67
5.3.140.0080.03612.66
5.3.130.0070.04012.66
5.3.120.0060.04012.66
5.3.110.0080.04712.66
5.3.100.0090.03612.13
5.3.90.0070.03712.11
5.3.80.0100.03712.11
5.3.70.0070.04212.10
5.3.60.0060.03912.09
5.3.50.0050.03912.04
5.3.40.0080.03512.04
5.3.30.0060.04211.99
5.3.20.0050.04411.78
5.3.10.0060.04311.74
5.3.00.0080.04011.73
5.2.170.0050.0319.22
5.2.160.0040.0319.22
5.2.150.0050.0319.23
5.2.140.0050.0319.22
5.2.130.0050.0299.18
5.2.120.0030.0319.18
5.2.110.0040.0309.19
5.2.100.0060.0309.18
5.2.90.0040.0329.18
5.2.80.0050.0309.18
5.2.70.0050.0309.18
5.2.60.0050.0309.13
5.2.50.0070.0289.10
5.2.40.0070.0279.08
5.2.30.0050.0299.05
5.2.20.0040.0309.04
5.2.10.0080.0338.95
5.2.00.0040.0328.82
5.1.60.0030.0268.09
5.1.50.0040.0258.09
5.1.40.0040.0248.07
5.1.30.0050.0268.42
5.1.20.0040.0278.45
5.1.10.0030.0278.17
5.1.00.0040.0258.17
5.0.50.0020.0226.65
5.0.40.0040.0196.50
5.0.30.0020.0336.32
5.0.20.0050.0176.29
5.0.10.0040.0226.27
5.0.00.0030.0346.25
4.4.90.0030.0164.77
4.4.80.0010.0174.76
4.4.70.0040.0144.75
4.4.60.0000.0184.76
4.4.50.0040.0144.77
4.4.40.0020.0294.71
4.4.30.0030.0154.76
4.4.20.0040.0154.85
4.4.10.0050.0154.85
4.4.00.0020.0264.76
4.3.110.0010.0174.66
4.3.100.0010.0174.66
4.3.90.0020.0154.63
4.3.80.0040.0234.59
4.3.70.0030.0144.63
4.3.60.0010.0174.63
4.3.50.0030.0154.63
4.3.40.0040.0234.54
4.3.30.0010.0173.30
4.3.20.0030.0153.28
4.3.10.0020.0163.23
4.3.00.0030.02315.27

preferences:
49.37 ms | 401 KiB | 5 Q