3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decorate(callable $fn, array $decorators, array $arguments = array()) { foreach (array_reverse($decorators) as $decorator) { if (is_callable($decorator)) { $fn = $decorator($fn); } } return call_user_func_array($fn, $arguments); } function decorator(callable $decorator) { // This function replaces 'trace' return function($wrapped) use ($decorator) { // This function replaces the function which 'trace' is used on. return function() use ($wrapped, $decorator) { var_dump($wrapped); $arguments = func_get_args(); return call_user_func($decorator, $wrapped, $arguments); }; }; } function _trace(callable $fn, array $arguments) { printf("Calling %s with arguments %s\n", print_r($fn, true), print_r($arguments, true)); return call_user_func_array($fn, $arguments); } function trace() { return decorate('_trace', ['decorator'], func_get_args()); } function _foo() { echo "Foo"; } function foo() { return decorate('_foo', ['trace'], func_get_args()); } foo();

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.0110.00718.52
8.3.60.0200.00016.63
8.3.50.0080.01117.36
8.3.40.0040.01118.66
8.3.30.0140.00018.71
8.3.20.0050.00318.91
8.3.10.0040.00420.52
8.3.00.0040.00419.38
8.2.180.0080.01116.63
8.2.170.0120.00322.96
8.2.160.0130.00720.33
8.2.150.0000.00724.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00417.63
8.2.110.0040.00420.40
8.2.100.0110.00018.03
8.2.90.0000.00719.26
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00917.93
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.08
8.2.20.0040.00417.54
8.2.10.0040.00417.75
8.2.00.0000.00717.80
8.1.280.0060.00925.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00023.75
8.1.230.0070.00319.15
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0080.00417.36
8.1.190.0050.00317.36
8.1.180.0050.00218.10
8.1.170.0030.00618.55
8.1.160.0020.00521.89
8.1.150.0080.00018.61
8.1.140.0040.00417.33
8.1.130.0030.00317.83
8.1.120.0040.00417.43
8.1.110.0040.00417.48
8.1.100.0070.00017.48
8.1.90.0040.00417.54
8.1.80.0000.00717.39
8.1.70.0070.00017.41
8.1.60.0060.00317.51
8.1.50.0000.00817.48
8.1.40.0000.00917.54
8.1.30.0060.00317.57
8.1.20.0040.00417.68
8.1.10.0030.00617.46
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0030.00318.34
8.0.270.0030.00317.17
8.0.260.0040.00416.90
8.0.250.0090.00017.04
8.0.240.0070.00017.05
8.0.230.0000.00717.06
8.0.220.0030.00316.88
8.0.210.0000.00716.95
8.0.200.0000.00817.07
8.0.190.0030.00517.00
8.0.180.0000.01016.91
8.0.170.0040.00416.95
8.0.160.0040.00417.03
8.0.150.0100.00016.95
8.0.140.0060.00316.95
8.0.130.0030.00313.36
8.0.120.0030.00516.94
8.0.110.0030.00416.80
8.0.100.0020.00516.80
8.0.90.0040.00416.96
8.0.80.0030.01217.00
8.0.70.0030.00517.02
8.0.60.0000.00716.91
8.0.50.0050.00216.84
8.0.30.0110.00816.98
8.0.20.0090.01217.01
8.0.10.0040.00416.98
8.0.00.0150.00716.95
7.4.330.0020.00213.03
7.4.320.0000.00616.52
7.4.300.0000.00616.43
7.4.290.0040.00416.42
7.4.280.0040.00416.64
7.4.270.0000.00816.62
7.4.260.0000.00613.25
7.4.250.0030.00616.54
7.4.240.0000.00716.57
7.4.230.0000.00716.60
7.4.220.0100.01016.39
7.4.210.0100.00716.67
7.4.200.0000.00716.64
7.4.190.0040.00416.43
7.4.160.0090.00616.45
7.4.150.0030.01316.45
7.4.140.0140.00416.47
7.4.130.0110.00816.68
7.4.120.0090.00816.69
7.4.110.0110.01516.75
7.4.100.0130.01016.48
7.4.90.0070.01116.58
7.4.80.0110.00619.39
7.4.70.0090.00916.64
7.4.60.0180.00316.49
7.4.50.0000.00616.41
7.4.40.0040.00716.55
7.4.30.0140.00316.52
7.4.00.0080.00814.95
7.3.330.0070.00013.30
7.3.320.0080.00013.15
7.3.310.0030.00516.36
7.3.300.0000.00716.37
7.3.290.0110.00416.33
7.3.280.0080.01216.34
7.3.270.0160.00316.61
7.3.260.0050.01216.58
7.3.250.0110.00916.47
7.3.240.0100.00716.43
7.3.230.0180.00316.31
7.3.210.0110.00616.27
7.3.200.0070.01016.45
7.3.190.0060.01516.68
7.3.180.0080.00816.46
7.3.170.0170.00016.56
7.3.160.0090.00616.41
7.3.120.0060.00814.86
7.3.110.0030.01415.02
7.3.100.0040.01114.48
7.3.90.0000.01014.84
7.3.80.0030.00714.62
7.3.70.0070.00714.61
7.3.60.0060.00314.97
7.3.50.0030.01014.55
7.3.40.0120.00314.79
7.3.30.0100.00714.84
7.3.20.0030.01016.61
7.3.10.0030.01016.65
7.3.00.0070.00616.69
7.2.330.0090.00916.55
7.2.320.0100.01016.82
7.2.310.0120.01016.77
7.2.300.0130.00316.46
7.2.290.0060.01316.66
7.2.250.0000.01914.85
7.2.240.0170.00315.03
7.2.230.0090.00615.19
7.2.220.0000.01415.22
7.2.210.0040.01114.93
7.2.200.0040.01114.89
7.2.190.0030.01215.11
7.2.180.0030.01315.08
7.2.170.0040.01415.15
7.2.130.0000.00916.97
7.2.120.0120.00316.70
7.2.110.0030.00916.96
7.2.100.0170.00916.71
7.2.90.0120.00616.71
7.2.80.0130.01316.91
7.2.70.0060.00916.61
7.2.60.0160.00316.88
7.2.50.0180.00516.78
7.2.40.0120.00916.80
7.2.30.0000.01516.67
7.2.20.0140.01016.53
7.2.10.0130.00316.81
7.2.00.0070.01118.13
7.1.330.0090.00616.02
7.1.320.0060.01015.70
7.1.310.0030.00615.79
7.1.300.0030.00815.80
7.1.290.0040.00815.66
7.1.280.0040.01115.44
7.1.270.0100.00715.82
7.1.260.0000.01315.55
7.1.250.0030.00715.74
7.1.200.0070.00715.78
7.1.100.0070.00717.84
7.1.70.0160.00917.10
7.1.60.0120.00919.40
7.1.50.0030.01616.79
7.1.00.0030.06022.35
7.0.200.0250.00414.86
7.0.140.0070.07022.09
7.0.120.0100.07022.05
7.0.60.0170.04319.95
7.0.50.0030.06717.88
7.0.40.0070.08320.10
7.0.30.0470.02320.08
7.0.20.0270.04320.07
7.0.10.0270.08020.26
7.0.00.0070.05320.15
5.6.280.0000.08021.01
5.6.210.0100.06020.57
5.6.200.0030.07718.14
5.6.190.0030.09320.56
5.6.180.0270.03720.49
5.6.170.0270.07020.48
5.6.160.0100.08020.50
5.6.150.0030.05718.16
5.6.140.0030.04018.16
5.6.130.0100.06718.24
5.6.120.0100.07721.12
5.6.110.0200.06720.91
5.6.100.0030.09321.09
5.6.90.0130.07321.09
5.6.80.0030.05320.56
5.5.350.0030.04320.43
5.5.340.0130.06317.97
5.5.330.0100.08020.13
5.5.320.0230.04020.48
5.5.310.0330.07320.35
5.5.300.0030.04017.93
5.5.290.0070.04317.95
5.5.280.0100.06320.92
5.5.270.0000.05720.79
5.5.260.0070.04020.86
5.5.250.0070.07020.71
5.5.240.0030.08720.28
5.4.450.0000.04319.38
5.4.440.0070.05719.18
5.4.430.0030.06019.30
5.4.420.0000.04319.20
5.4.410.0000.04719.34
5.4.400.0100.06319.25
5.4.390.0100.07719.25
5.4.380.0030.07019.01
5.4.370.0070.07318.98
5.4.360.0100.08019.09
5.4.350.0100.07318.86
5.4.340.0030.04319.26
5.4.320.0030.08718.88
5.4.310.0130.06719.24
5.4.300.0030.04019.12
5.4.290.0030.05718.92
5.4.280.0100.05319.20
5.4.270.0100.03719.27
5.4.260.0070.04018.85
5.4.250.0100.03719.24
5.4.240.0100.04018.97
5.4.230.0070.06719.24
5.4.220.0000.06318.85
5.4.210.0070.04719.00
5.4.200.0030.07719.14
5.4.190.0070.03719.15
5.4.180.0030.04018.87
5.4.170.0030.04319.23
5.4.160.0130.06719.23
5.4.150.0070.07019.10
5.4.140.0030.07316.48
5.4.130.0030.04716.43
5.4.120.0130.06316.34
5.4.110.0130.03316.55
5.4.100.0070.07016.35
5.4.90.0000.06316.35
5.4.80.0070.07016.57
5.4.70.0070.05316.44
5.4.60.0100.06316.40
5.4.50.0070.06016.43
5.4.40.0070.03316.39
5.4.30.0030.04716.31
5.4.20.0100.03716.45
5.4.10.0000.04716.39
5.4.00.0100.07015.74
5.3.290.0070.04714.72
5.3.280.0100.06314.68
5.3.270.0030.07014.63
5.3.260.0070.03714.68
5.3.250.0070.07314.62
5.3.240.0000.07714.68
5.3.230.0030.08314.66
5.3.220.0070.08014.61
5.3.210.0070.05014.59
5.3.200.0070.03714.59
5.3.190.0070.04314.66
5.3.180.0070.04314.59
5.3.170.0030.06314.60
5.3.160.0070.03714.64
5.3.150.0070.03314.66
5.3.140.0000.04014.67
5.3.130.0030.05314.73
5.3.120.0070.07314.60
5.3.110.0000.07014.59
5.3.100.0100.05313.97
5.3.90.0030.06314.07
5.3.80.0200.06014.22
5.3.70.0070.05014.21
5.3.60.0000.05314.20
5.3.50.0100.05313.97
5.3.40.0000.06313.89
5.3.30.0170.06013.98
5.3.20.0070.07313.71
5.3.10.0030.05713.64
5.3.00.0070.07013.55
5.2.170.0100.05711.31
5.2.160.0030.05311.30
5.2.150.0030.03311.30
5.2.140.0000.07011.20
5.2.130.0070.05311.14
5.2.120.0070.02711.26
5.2.110.0100.04310.99
5.2.100.0030.06011.11
5.2.90.0030.05711.16
5.2.80.0130.05711.25
5.2.70.0030.04011.06
5.2.60.0070.05711.01
5.2.50.0100.05710.98
5.2.40.0000.04311.14
5.2.30.0030.03310.86
5.2.20.0030.06311.01
5.2.10.0070.05710.92
5.2.00.0100.05010.68
5.1.60.0070.0539.97
5.1.50.0100.0239.97
5.1.40.0030.05310.07
5.1.30.0130.05010.30
5.1.20.0030.03710.32
5.1.10.0070.05710.10
5.1.00.0030.06010.01
5.0.50.0000.0278.52
5.0.40.0070.0378.37
5.0.30.0030.0538.19
5.0.20.0030.0438.27
5.0.10.0030.0438.14
5.0.00.0000.0608.17
4.4.90.0000.0207.81
4.4.80.0030.0337.81
4.4.70.0030.0337.81
4.4.60.0030.0337.81
4.4.50.0030.0307.81
4.4.40.0000.0437.81
4.4.30.0030.0177.81
4.4.20.0030.0177.81
4.4.10.0000.0177.81
4.4.00.0000.0277.81
4.3.110.0000.0377.81
4.3.100.0000.0377.81
4.3.90.0000.0237.81
4.3.80.0030.0537.81
4.3.70.0030.0137.81
4.3.60.0000.0207.81
4.3.50.0070.0207.81
4.3.40.0000.0307.81
4.3.30.0000.0177.81
4.3.20.0030.0377.81
4.3.10.0030.0137.81
4.3.00.0000.0377.81

preferences:
47.21 ms | 401 KiB | 5 Q