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($decorated); $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.43
8.3.50.0070.00922.11
8.3.40.0060.01119.02
8.3.30.0040.01119.11
8.3.20.0070.00020.29
8.3.10.0000.00821.67
8.3.00.0080.00018.03
8.2.180.0060.00916.88
8.2.170.0030.01022.96
8.2.160.0070.00720.58
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00820.80
8.2.110.0000.00920.56
8.2.100.0120.00018.03
8.2.90.0060.00319.35
8.2.80.0060.00317.97
8.2.70.0000.00917.75
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0040.00418.34
8.2.30.0000.00918.16
8.2.20.0040.00417.82
8.2.10.0070.00018.02
8.2.00.0000.00717.68
8.1.280.0130.01325.92
8.1.270.0000.00823.87
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0060.00322.29
8.1.230.0040.00817.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0000.00722.08
8.1.150.0030.00318.89
8.1.140.0000.00717.38
8.1.130.0060.00017.79
8.1.120.0000.00717.51
8.1.110.0000.00817.48
8.1.100.0080.00017.46
8.1.90.0000.00817.52
8.1.80.0000.00817.45
8.1.70.0000.00717.38
8.1.60.0030.00517.64
8.1.50.0000.00817.53
8.1.40.0040.00417.43
8.1.30.0050.00317.63
8.1.20.0000.00717.62
8.1.10.0000.00717.53
8.1.00.0030.00517.53
8.0.300.0080.00018.77
8.0.290.0030.00516.75
8.0.280.0000.00718.45
8.0.270.0080.00017.26
8.0.260.0060.00018.50
8.0.250.0000.00716.97
8.0.240.0000.00716.90
8.0.230.0070.00017.04
8.0.220.0040.00416.88
8.0.210.0040.00417.01
8.0.200.0030.00617.08
8.0.190.0000.00716.91
8.0.180.0030.00517.05
8.0.170.0040.00416.89
8.0.160.0070.00017.05
8.0.150.0040.00416.79
8.0.140.0000.00816.97
8.0.130.0050.00013.39
8.0.120.0030.00616.96
8.0.110.0050.00216.84
8.0.100.0000.00716.99
8.0.90.0040.00416.79
8.0.80.0120.00317.00
8.0.70.0040.00416.99
8.0.60.0050.00317.04
8.0.50.0040.00416.98
8.0.30.0100.00817.14
8.0.20.0060.01417.40
8.0.10.0040.00417.04
8.0.00.0070.01216.88
7.4.330.0000.00515.05
7.4.320.0000.00616.61
7.4.300.0040.00416.54
7.4.290.0070.00016.53
7.4.280.0000.00816.51
7.4.270.0040.00416.44
7.4.260.0090.00016.48
7.4.250.0040.00416.49
7.4.240.0050.00216.62
7.4.230.0000.00816.59
7.4.220.0070.01016.65
7.4.210.0000.01416.71
7.4.200.0030.00416.34
7.4.160.0060.00916.61
7.4.150.0110.01117.40
7.4.140.0130.00817.86
7.4.130.0030.01516.56
7.4.120.0090.01016.62
7.4.110.0080.00916.54
7.4.100.0070.01016.52
7.4.90.0140.00316.39
7.4.80.0100.00719.39
7.4.70.0130.00316.44
7.4.60.0090.01116.66
7.4.50.0060.00316.50
7.4.40.0060.00916.37
7.4.30.0080.00816.50
7.4.00.0130.00314.92
7.3.330.0070.00013.41
7.3.320.0030.00313.35
7.3.310.0080.00016.46
7.3.300.0040.00416.31
7.3.290.0090.00916.47
7.3.280.0090.00916.46
7.3.270.0170.00017.40
7.3.260.0100.00716.52
7.3.250.0120.00616.46
7.3.240.0070.01116.52
7.3.230.0090.00616.39
7.3.210.0120.00616.38
7.3.200.0100.01319.39
7.3.190.0060.01216.43
7.3.180.0070.01616.65
7.3.170.0060.00916.49
7.3.160.0130.00316.38
7.3.120.0090.00614.95
7.3.110.0030.01014.79
7.3.100.0000.00814.90
7.3.90.0100.00315.05
7.3.80.0030.01415.13
7.3.70.0070.00414.88
7.3.60.0030.00614.89
7.3.50.0040.00714.94
7.3.40.0040.00814.82
7.3.30.0070.00714.89
7.3.20.0070.01116.89
7.3.10.0080.00416.75
7.3.00.0080.00416.65
7.2.330.0100.00916.53
7.2.320.0130.00316.37
7.2.310.0100.01316.81
7.2.300.0150.00316.75
7.2.290.0000.02016.29
7.2.240.0000.01515.14
7.2.230.0110.00414.60
7.2.220.0110.00715.00
7.2.210.0040.01215.17
7.2.200.0050.00515.12
7.2.190.0040.01114.83
7.2.180.0120.00414.74
7.2.170.0070.00715.20
7.2.160.0110.00415.11
7.2.150.0070.01116.93
7.2.140.0100.00316.77
7.2.130.0040.00816.61
7.2.120.0070.01017.11
7.2.110.0060.00916.99
7.2.100.0000.01416.89
7.2.90.0080.00417.09
7.2.80.0070.00716.93
7.2.70.0090.00616.80
7.2.60.0030.00816.91
7.2.50.0040.01216.54
7.2.40.0080.00317.09
7.2.30.0070.01116.91
7.2.20.0090.00616.93
7.2.10.0060.00916.94
7.2.00.0030.00817.90
7.1.330.0030.00715.75
7.1.320.0060.00615.78
7.1.310.0080.00415.71
7.1.300.0070.00715.73
7.1.290.0080.00815.60
7.1.280.0070.00715.99
7.1.270.0040.00815.87
7.1.260.0070.00715.84
7.1.250.0040.00715.69
7.1.200.0110.00315.91
7.1.100.0060.01118.16
7.1.70.0030.00317.05
7.1.60.0130.01019.25
7.1.50.0090.00916.70
7.1.00.0130.06722.46
7.0.200.0030.00716.88
7.0.140.0070.06721.97
7.0.60.0030.05319.79
7.0.50.0030.05317.91
7.0.40.0230.07720.11
7.0.30.0200.04020.13
7.0.20.0300.06320.07
7.0.10.0070.05020.03
7.0.00.0030.08320.21
5.6.280.0070.07020.92
5.6.210.0070.07320.48
5.6.200.0070.05318.23
5.6.190.0030.04320.48
5.6.180.0300.07320.33
5.6.170.0300.08320.55
5.6.160.0000.05320.54
5.6.150.0100.07718.16
5.6.140.0130.06018.13
5.6.130.0070.08718.17
5.6.120.0200.06721.13
5.6.110.0100.09720.97
5.6.100.0130.08020.99
5.6.90.0070.04321.01
5.6.80.0030.08320.50
5.5.350.0030.07720.45
5.5.340.0100.04317.93
5.5.330.0000.04720.41
5.5.320.0300.07720.24
5.5.310.0300.08020.42
5.5.300.0000.04017.95
5.5.290.0000.04318.08
5.5.280.0070.06320.82
5.5.270.0030.04720.98
5.5.260.0100.03720.89
5.5.250.0070.08720.62
5.5.240.0230.05320.10
5.4.450.0300.04319.42
5.4.440.0270.04319.57
5.4.430.0500.03019.36
5.4.420.0370.04719.56
5.4.410.0530.04719.37
5.4.400.0270.04019.32
5.4.390.0370.04019.23
5.4.380.0270.04318.76
5.4.370.0170.04718.73
5.4.360.0100.05318.73
5.4.350.0100.05718.73
5.4.340.0130.05718.77
5.4.320.0070.03912.51
5.4.310.0070.03712.51
5.4.300.0080.03712.51
5.4.290.0060.03712.51
5.4.280.0070.03312.40
5.4.270.0040.04012.40
5.4.260.0060.03712.40
5.4.250.0050.03912.41
5.4.240.0050.04212.40
5.4.230.0090.03912.39
5.4.220.0050.04012.39
5.4.210.0060.03512.40
5.4.200.0080.03612.40
5.4.190.0060.03712.39
5.4.180.0080.04612.39
5.4.170.0070.03512.40
5.4.160.0040.04212.39
5.4.150.0040.03812.39
5.4.140.0050.04212.08
5.4.130.0060.04512.07
5.4.120.0090.03312.03
5.4.110.0070.04312.02
5.4.100.0070.03412.02
5.4.90.0070.03612.02
5.4.80.0060.03812.02
5.4.70.0050.03512.02
5.4.60.0050.04112.02
5.4.50.0050.03712.02
5.4.40.0070.03412.00
5.4.30.0110.04012.00
5.4.20.0060.04312.00
5.4.10.0080.03312.00
5.4.00.0060.03611.49
5.3.290.0100.04412.80
5.3.280.0070.03912.71
5.3.270.0070.04212.72
5.3.260.0080.04212.71
5.3.250.0050.04012.72
5.3.240.0060.03712.72
5.3.230.0060.03712.71
5.3.220.0050.03712.68
5.3.210.0080.03712.68
5.3.200.0060.03612.68
5.3.190.0060.03712.67
5.3.180.0060.03612.68
5.3.170.0050.03712.67
5.3.160.0070.04312.67
5.3.150.0050.04112.68
5.3.140.0050.03812.66
5.3.130.0080.04112.66
5.3.120.0080.03812.66
5.3.110.0080.03612.66
5.3.100.0060.03712.13
5.3.90.0070.03612.11
5.3.80.0060.03612.10
5.3.70.0060.03712.10
5.3.60.0050.03812.09
5.3.50.0050.03712.03
5.3.40.0070.03512.04
5.3.30.0090.03712.00
5.3.20.0070.03911.78
5.3.10.0110.03311.74
5.3.00.0100.03611.73
5.2.170.0060.0339.22
5.2.160.0030.0349.22
5.2.150.0060.0299.22
5.2.140.0010.0359.22
5.2.130.0050.0299.18
5.2.120.0050.0329.18
5.2.110.0080.0279.19
5.2.100.0030.0309.19
5.2.90.0070.0269.18
5.2.80.0030.0329.19
5.2.70.0050.0339.18
5.2.60.0060.0289.13
5.2.50.0040.0319.10
5.2.40.0040.0299.07
5.2.30.0090.0259.05
5.2.20.0050.0309.04
5.2.10.0050.0298.95
5.2.00.0060.0278.81
5.1.60.0020.0268.09
5.1.50.0090.0248.09
5.1.40.0050.0238.07
5.1.30.0070.0238.42
5.1.20.0030.0348.45
5.1.10.0040.0268.16
5.1.00.0080.0298.17
5.0.50.0030.0216.65
5.0.40.0050.0196.50
5.0.30.0040.0306.32
5.0.20.0040.0186.29
5.0.10.0060.0216.27
5.0.00.0050.0336.25
4.4.90.0070.0124.78
4.4.80.0040.0154.75
4.4.70.0030.0184.75
4.4.60.0020.0164.76
4.4.50.0060.0184.77
4.4.40.0020.0294.71
4.4.30.0030.0164.76
4.4.20.0020.0204.85
4.4.10.0010.0174.85
4.4.00.0030.0294.76
4.3.110.0040.0154.67
4.3.100.0020.0224.66
4.3.90.0040.0174.64
4.3.80.0030.0294.58
4.3.70.0040.0174.63
4.3.60.0050.0174.63
4.3.50.0050.0174.63
4.3.40.0040.0254.54
4.3.30.0040.0173.30
4.3.20.0020.0163.28
4.3.10.0020.0173.24
4.3.00.0070.01715.27

preferences:
46.74 ms | 401 KiB | 5 Q