3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decorate(callable $fn, callable $decorator) { return function() use ($fn, $decorator) { $d = $decorator(); $gen = $d(); if (is_array($gen->current())) { $arguments = $gen->current(); } else { $arguments = func_get_args(); } $gen->send(call_user_func_array($fn, $arguments)); }; } function foo() { throw new Exception("Error!"); } function catch_all_exceptions() { return function() { try { (yield ["foo" => "bar"]); } catch (\Exception $e) { echo "Caught Exception: $e\n"; } }; } $foo = decorate("foo", "catch_all_exceptions"); $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.60.0100.00718.55
8.3.50.0110.00522.10
8.3.40.0100.00718.98
8.3.30.0060.00918.81
8.3.20.0000.00818.73
8.3.10.0050.00319.16
8.3.00.0000.00723.66
8.2.180.0100.01016.88
8.2.170.0030.01222.96
8.2.160.0110.00320.32
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.36
8.2.110.0070.00322.16
8.2.100.0060.00617.72
8.2.90.0050.00319.03
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00718.22
8.2.30.0000.00719.72
8.2.20.0040.00417.71
8.2.10.0050.00317.72
8.2.00.0000.00817.84
8.1.280.0170.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01022.38
8.1.230.0080.00321.09
8.1.220.0090.00018.77
8.1.210.0000.00819.04
8.1.200.0000.00817.35
8.1.190.0000.00717.61
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0000.00818.96
8.1.150.0040.00418.59
8.1.140.0000.00717.48
8.1.130.0000.00717.88
8.1.120.0000.00717.43
8.1.110.0000.01017.39
8.1.100.0040.00417.36
8.1.90.0040.00417.45
8.1.80.0030.00417.43
8.1.70.0030.00317.45
8.1.60.0040.00417.63
8.1.50.0000.00817.46
8.1.40.0050.00217.54
8.1.30.0040.00417.60
8.1.20.0040.00417.60
8.1.10.0050.00217.55
8.1.00.0080.00417.56
8.0.300.0040.00419.93
8.0.290.0030.00616.88
8.0.280.0000.00718.46
8.0.270.0030.00317.25
8.0.260.0030.00316.90
8.0.250.0070.00017.03
8.0.240.0030.00616.96
8.0.230.0050.00217.07
8.0.220.0030.00316.91
8.0.210.0030.00317.00
8.0.200.0000.00716.99
8.0.190.0050.00217.04
8.0.180.0050.00216.89
8.0.170.0040.00417.02
8.0.160.0030.00516.84
8.0.150.0000.00916.78
8.0.140.0000.00716.95
8.0.130.0000.00513.44
8.0.120.0050.00216.81
8.0.110.0050.00316.87
8.0.100.0050.00316.99
8.0.90.0040.00416.84
8.0.80.0040.01217.01
8.0.70.0040.00416.98
8.0.60.0000.00716.95
8.0.50.0000.00816.79
8.0.30.0120.01117.15
8.0.20.0070.01117.40
8.0.10.0000.00717.06
8.0.00.0130.00516.70
7.4.330.0050.00014.77
7.4.320.0040.00416.62
7.4.300.0000.00616.51
7.4.290.0030.00316.38
7.4.280.0000.00816.54
7.4.270.0070.00016.43
7.4.260.0060.00013.30
7.4.250.0040.00416.51
7.4.240.0040.00416.66
7.4.230.0030.00316.57
7.4.220.0100.00616.38
7.4.210.0120.00516.59
7.4.200.0030.00316.62
7.4.190.0040.00416.68
7.4.160.0040.01216.47
7.4.150.0030.01417.40
7.4.140.0130.00817.86
7.4.130.0050.01216.64
7.4.120.0020.01816.55
7.4.110.0110.01116.40
7.4.100.0030.01616.55
7.4.90.0070.01116.67
7.4.80.0090.01219.37
7.4.70.0030.01416.50
7.4.60.0080.01416.23
7.4.50.0000.00816.55
7.4.40.0080.00822.27
7.4.30.0030.01316.50
7.4.10.0120.00814.84
7.4.00.0140.00315.04
7.3.330.0000.00513.25
7.3.320.0000.00513.24
7.3.310.0000.00716.42
7.3.300.0030.00316.25
7.3.290.0090.01016.39
7.3.280.0100.01216.36
7.3.270.0150.00317.40
7.3.260.0080.00818.24
7.3.250.0100.01016.57
7.3.240.0030.01316.57
7.3.230.0060.01016.59
7.3.210.0090.00916.29
7.3.200.0140.01019.39
7.3.190.0160.00716.46
7.3.180.0090.00616.62
7.3.170.0150.00316.52
7.3.160.0160.00616.59
7.3.130.0030.01614.75
7.3.120.0020.01415.05
7.3.110.0040.01114.83
7.3.100.0100.00315.10
7.3.90.0090.00314.89
7.3.80.0070.00714.83
7.3.70.0000.01114.56
7.3.60.0000.01414.82
7.3.50.0060.01214.50
7.3.40.0120.00614.91
7.3.30.0150.00014.92
7.3.20.0150.00316.68
7.3.10.0090.00616.86
7.3.00.0030.00616.54
7.2.330.0130.00616.68
7.2.320.0160.00016.52
7.2.310.0100.01016.61
7.2.300.0070.01016.71
7.2.290.0040.01216.71
7.2.260.0070.01015.24
7.2.250.0060.01314.99
7.2.240.0090.00315.29
7.2.230.0030.01314.93
7.2.220.0120.00315.04
7.2.210.0000.01315.12
7.2.200.0030.00615.17
7.2.190.0030.01215.00
7.2.180.0130.00715.16
7.2.170.0060.00615.18
7.2.160.0060.00914.90
7.2.150.0030.01317.02
7.2.140.0000.01416.68
7.2.130.0090.00617.03
7.2.120.0030.01016.60
7.2.110.0090.00917.02
7.2.100.0070.00317.07
7.2.90.0080.01116.84
7.2.80.0160.00116.74
7.2.70.0070.01116.98
7.2.60.0080.00616.92
7.2.50.0030.00617.06
7.2.40.0030.01017.06
7.2.30.0070.00717.14
7.2.20.0030.01016.92
7.2.10.0070.00716.97
7.2.00.0060.00418.25
7.1.330.0070.00715.91
7.1.320.0030.01015.80
7.1.310.0110.00315.63
7.1.300.0090.00915.94
7.1.290.0040.01115.48
7.1.280.0040.00815.64
7.1.270.0030.01315.90
7.1.260.0000.01215.82
7.1.250.0070.00715.77
7.1.240.0040.01415.79
7.1.230.0070.00415.64
7.1.220.0030.00915.95
7.1.210.0130.00015.61
7.1.200.0060.00815.64
7.1.190.0100.00715.57
7.1.180.0030.01015.77
7.1.170.0090.00315.73
7.1.160.0100.00315.96
7.1.150.0110.00315.42
7.1.140.0060.00915.50
7.1.130.0120.00315.80
7.1.120.0040.00815.79
7.1.110.0030.01015.86
7.1.100.0100.00315.76
7.1.90.0090.00615.79
7.1.80.0070.01015.54
7.1.70.0020.01016.58
7.1.60.0020.01116.48
7.1.50.0030.01516.29
7.1.40.0080.00415.76
7.1.30.0080.00415.68
7.1.20.0030.01215.80
7.1.10.0000.00815.77
7.1.00.0060.04019.06
7.0.330.0090.00015.37
7.0.320.0030.01015.33
7.0.310.0000.01315.18
7.0.300.0000.01515.15
7.0.290.0080.00415.57
7.0.280.0100.00015.25
7.0.270.0070.00715.20
7.0.260.0000.01015.35
7.0.250.0060.00614.99
7.0.240.0090.00615.19
7.0.230.0030.00715.36
7.0.220.0130.00315.04
7.0.210.0030.01315.54
7.0.200.0020.00916.12
7.0.190.0090.00315.11
7.0.180.0100.00315.31
7.0.170.0090.00315.25
7.0.160.0070.00715.43
7.0.150.0040.00815.43
7.0.140.0060.03518.70
7.0.130.0040.00415.48
7.0.120.0060.00315.26
7.0.110.0070.00315.46
7.0.100.0040.00815.42
7.0.90.0030.01015.42
7.0.80.0050.00515.63
7.0.70.0020.02018.35
7.0.60.0020.02718.54
7.0.50.0030.02418.83
7.0.40.0040.02216.62
7.0.30.0020.02916.75
7.0.20.0030.02416.79
7.0.10.0050.02416.54
7.0.00.0020.03016.63
5.6.400.0000.01414.55
5.6.390.0000.01614.45
5.6.380.0030.01014.50
5.6.370.0040.01513.86
5.6.360.0070.00714.61
5.6.350.0080.00414.28
5.6.340.0000.01314.50
5.6.330.0070.00714.36
5.6.320.0080.00014.71
5.6.310.0060.01214.59
5.6.300.0030.01014.54
5.6.290.0110.00314.43
5.6.280.0030.03817.52
5.6.270.0030.00914.45
5.6.260.0000.01514.61
5.6.250.0070.00314.45
5.6.240.0000.01114.60
5.6.230.0090.00614.21
5.6.220.0030.02217.35
5.6.210.0030.02217.58
5.6.200.0080.02317.67
5.6.190.0080.02217.81
5.6.180.0040.02717.75
5.6.170.0060.02117.79
5.6.160.0080.02017.51
5.6.150.0020.02717.72
5.6.140.0010.02917.72
5.6.130.0030.02217.86
5.6.120.0050.02217.72
5.6.110.0050.02417.78
5.6.100.0040.02417.59
5.6.90.0030.02217.73
5.6.80.0080.02017.50
5.6.70.0050.02017.40
5.6.60.0000.02317.49
5.6.50.0030.01917.50
5.6.40.0000.02717.31
5.6.30.0020.02817.24
5.6.20.0100.02217.35
5.6.10.0040.02517.27
5.6.00.0050.01817.37
5.5.380.0000.01613.94
5.5.370.0060.00614.50
5.5.360.0070.02317.48
5.5.350.0060.02017.33
5.5.340.0060.02417.66
5.5.330.0020.02917.47
5.5.320.0050.02317.46
5.5.310.0020.02417.46
5.5.300.0020.02317.44
5.5.290.0060.02317.71
5.5.280.0010.02817.51
5.5.270.0030.02917.46
5.5.260.0050.02517.64
5.5.250.0020.02717.56
5.5.240.0020.02717.08
5.5.230.0030.02517.20
5.5.220.0080.02117.20
5.5.210.0050.02117.29
5.5.200.0000.02917.20
5.5.190.0050.02517.29
5.5.180.0040.02617.33
5.5.170.0060.00314.42
5.5.160.0020.02217.20
5.5.150.0050.02317.27
5.5.140.0070.02317.11
5.5.130.0030.02617.27
5.5.120.0080.02217.39
5.5.110.0030.02517.35
5.5.100.0050.02217.11
5.5.90.0030.02717.08
5.5.80.0030.02217.24
5.5.70.0040.02317.22
5.5.60.0050.02117.13
5.5.50.0000.02917.21
5.5.40.0020.02817.12
5.5.30.0020.02717.06
5.5.20.0060.02217.11
5.5.10.0000.02817.15
5.5.00.0060.02317.22
5.4.450.0050.02515.86
5.4.440.0030.01815.74
5.4.430.0060.01815.74
5.4.420.0000.02715.83
5.4.410.0030.02215.77
5.4.400.0000.02215.65
5.4.390.0030.02515.64
5.4.380.0000.02515.69
5.4.370.0030.02215.67
5.4.360.0020.02215.68
5.4.350.0010.02115.70
5.4.340.0020.02015.54
5.4.330.0090.00312.24
5.4.320.0020.02015.74
5.4.310.0020.02415.64
5.4.300.0030.01715.72
5.4.290.0040.02415.70
5.4.280.0060.02115.66
5.4.270.0030.02115.70
5.4.260.0050.02215.55
5.4.250.0050.02115.65
5.4.240.0050.02315.68
5.4.230.0030.02315.72
5.4.220.0050.02215.56
5.4.210.0030.02115.72
5.4.200.0000.02715.69
5.4.190.0030.02215.54
5.4.180.0020.02615.68
5.4.170.0030.02115.69
5.4.160.0010.02115.55
5.4.150.0020.02715.68
5.4.140.0020.02514.35
5.4.130.0030.01814.32
5.4.120.0030.02014.29
5.4.110.0020.02514.36
5.4.100.0080.01514.41
5.4.90.0070.02014.39
5.4.80.0050.01814.34
5.4.70.0080.02014.30
5.4.60.0000.02614.34
5.4.50.0030.02214.33
5.4.40.0000.02514.30
5.4.30.0020.02014.35
5.4.20.0050.01814.30
5.4.10.0030.02214.35
5.4.00.0020.01814.05
5.3.290.0020.02513.44
5.3.280.0000.02413.43
5.3.270.0010.02513.42
5.3.260.0010.02613.39
5.3.250.0040.01913.50
5.3.240.0040.01913.48
5.3.230.0050.02113.45
5.3.220.0030.02313.44
5.3.210.0030.02013.38
5.3.200.0050.02013.44
5.3.190.0020.02313.42
5.3.180.0050.02213.41
5.3.170.0020.01913.38
5.3.160.0030.02113.48
5.3.150.0030.01813.41
5.3.140.0000.02713.37
5.3.130.0050.02013.47
5.3.120.0030.02413.42
5.3.110.0010.02413.36
5.3.100.0020.02013.18
5.3.90.0010.01813.12
5.3.80.0020.02113.18
5.3.70.0020.02013.17
5.3.60.0020.02213.14
5.3.50.0040.01813.16
5.3.40.0030.01713.11
5.3.30.0080.02113.11
5.3.20.0160.02312.94
5.3.10.0100.02413.02
5.3.00.0100.02313.00
5.2.170.0030.03011.14
5.2.160.0030.02311.14
5.2.150.0000.03711.06
5.2.140.0200.03311.16
5.2.130.0130.02711.16
5.2.120.0170.02711.15
5.2.110.0170.03011.02
5.2.100.0330.02711.21
5.2.90.0130.03011.17
5.2.80.0130.02710.96
5.2.70.0070.02311.20
5.2.60.0130.03311.05
5.2.50.0000.04311.07
5.2.40.0000.03011.07
5.2.30.0000.03010.95
5.2.20.0000.03011.10
5.2.10.0030.02010.88
5.2.00.0030.02010.85
5.1.60.0000.0239.98
5.1.50.0000.02010.05
5.1.40.0030.01710.04
5.1.30.0070.01710.27
5.1.20.0070.02710.26
5.1.10.0000.02710.13
5.1.00.0070.02310.05
5.0.50.0000.0239.63
5.0.40.0030.0209.63
5.0.30.0030.0239.63
5.0.20.0070.0139.63
5.0.10.0000.0239.63
5.0.00.0030.0279.63
4.4.90.0000.0139.63
4.4.80.0000.0238.49
4.4.70.0030.0109.63
4.4.60.0000.0179.63
4.4.50.0000.0209.63
4.4.40.0000.0239.63
4.4.30.0000.0139.63
4.4.20.0000.0209.63
4.4.10.0030.0179.63
4.4.00.0000.0239.63
4.3.110.0000.0139.63
4.3.100.0030.0139.63
4.3.90.0000.0179.63
4.3.80.0030.0239.63
4.3.70.0000.0179.63
4.3.60.0000.0139.63
4.3.50.0030.0179.63
4.3.40.0030.0239.63
4.3.30.0000.0179.63
4.3.20.0000.0139.63
4.3.10.0000.0139.63
4.3.00.0070.0109.63

preferences:
44.41 ms | 401 KiB | 5 Q