3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dummy { public $input; function __construct($input = array(1,2,3)) { $this->input = $input; } function run() { foreach($this->input as $key=>$value) { if($key == 2) throw new Exception('hello exception'); } } } function retry(Dummy $dum) { try { $dum->run(); } catch(Exception $e) { // solve the exception //if($dum->input[2]) //unset($dum->input[2]); retry($dum); } } $dum = new Dummy; retry($dum);

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.40.0240.02147.54
8.3.30.0310.02048.14
8.3.20.0160.01048.95
8.3.10.0060.00949.92
8.3.00.0110.01149.88
8.2.170.0330.01048.02
8.2.160.0140.01448.86
8.2.150.0240.00347.50
8.2.140.0230.00347.69
8.2.130.0220.00349.24
8.2.120.0180.00648.29
8.2.110.0180.00649.60
8.2.100.0210.01246.93
8.2.90.0170.00347.80
8.2.80.0160.00646.79
8.2.70.0130.01346.00
8.2.60.0180.00346.68
8.2.50.0180.00746.38
8.2.40.0150.00746.97
8.2.30.0070.01446.87
8.2.20.0130.01046.57
8.2.10.0130.00946.40
8.2.00.0110.01146.60
8.1.270.0160.01350.57
8.1.260.0120.00349.94
8.1.250.0140.01149.35
8.1.240.0140.00351.63
8.1.230.0260.00647.84
8.1.220.0170.00346.29
8.1.210.0170.00345.98
8.1.200.0170.00745.85
8.1.190.0170.00346.03
8.1.180.0220.00047.41
8.1.170.0070.01446.92
8.1.160.0260.00050.47
8.1.150.0140.00747.09
8.1.140.0170.00746.08
8.1.130.0170.00346.31
8.1.120.0100.01046.13
8.1.110.0100.01045.97
8.1.100.0170.00346.09
8.1.90.0200.00046.04
8.1.80.0130.00646.05
8.1.70.0080.01146.07
8.1.60.0230.00346.23
8.1.50.0140.01046.11
8.1.40.0200.00446.00
8.1.30.0090.01246.04
8.1.20.0160.00646.09
8.1.10.0290.00979.09
8.1.00.0270.01379.14
8.0.300.0200.01378.40
8.0.290.0230.01378.55
8.0.280.0210.01479.98
8.0.270.0270.01478.79
8.0.260.0290.00678.39
8.0.250.0170.01778.50
8.0.240.0370.00378.53
8.0.230.0210.01078.38
8.0.220.0180.01478.43
8.0.210.0300.00378.41
8.0.200.0250.01178.45
8.0.190.0320.00778.45
8.0.180.0250.02278.35
8.0.170.0100.02778.38
8.0.160.0130.02678.32
8.0.150.0430.01778.31
8.0.140.0280.01478.29
8.0.130.0540.010133.42
8.0.120.0320.00778.32
8.0.110.0160.01678.25
8.0.100.0200.01378.48
8.0.90.0190.01678.43
8.0.80.0570.02378.38
8.0.70.0230.01378.40
8.0.60.0280.01078.38
8.0.50.0320.00778.31
8.0.30.0650.03178.62
8.0.20.0630.03778.67
8.0.10.0210.01778.47
8.0.00.0880.03878.27
7.4.330.0230.01074.70
7.4.320.0170.01778.03
7.4.300.0250.00977.93
7.4.290.0370.00777.98
7.4.280.0370.01077.85
7.4.270.0200.02078.04
7.4.260.0290.00678.01
7.4.250.0270.01477.91
7.4.240.0220.01578.01
7.4.230.0200.01778.09
7.4.220.0860.03677.99
7.4.210.0590.02977.96
7.4.200.0340.00377.78
7.4.190.0260.01077.98
7.4.160.0610.02278.00
7.4.150.0460.05378.06
7.4.140.0610.04077.92
7.4.130.0680.03177.94
7.4.120.0580.03578.02
7.4.110.0730.02478.01
7.4.100.0630.03377.99
7.4.90.0800.03377.79
7.4.80.0600.04077.95
7.4.70.0830.04177.97
7.4.60.0530.03777.86
7.4.50.0060.01678.05
7.4.40.0300.03377.98
7.4.30.0380.05078.02
7.4.00.0440.02076.48
7.3.330.0460.033133.46
7.3.320.0450.023133.24
7.3.310.0190.01977.77
7.3.300.0310.00777.80
7.3.290.0580.04077.86
7.3.280.0670.03677.82
7.3.270.0610.03378.03
7.3.260.0710.03277.77
7.3.250.0800.03178.00
7.3.240.0550.05577.96
7.3.230.0670.02777.99
7.3.210.0670.02777.85
7.3.200.0660.05177.93
7.3.190.0670.03077.82
7.3.180.0500.04078.04
7.3.170.0720.02078.13
7.3.160.0550.05577.86
7.3.120.0390.00776.55
7.3.10.0420.01978.66
7.3.00.0970.01078.47
7.2.330.0600.03577.71
7.2.320.0690.03677.66
7.2.310.0600.03077.93
7.2.300.0470.04777.66
7.2.290.0580.03778.02
7.2.130.0910.02478.88
7.2.120.0350.01679.00
7.2.110.0290.02278.62
7.2.100.0420.02178.82
7.2.90.0300.02378.95
7.2.80.0270.02278.90
7.2.70.0480.02478.91
7.2.60.0830.02778.73
7.2.50.0380.02278.58
7.2.40.0380.03178.89
7.2.30.0340.01878.83
7.2.20.0490.01778.88
7.2.10.0360.02278.89
7.2.00.0350.01879.03
7.1.250.0370.02777.51
7.1.200.1070.02077.61
7.1.70.0750.04478.73
7.1.60.0980.02079.17
7.1.50.0970.02678.83
7.1.40.1020.01878.32
7.1.30.1070.02378.50
7.1.20.0980.01478.62
7.1.10.0920.01378.64
7.1.00.4240.03978.19
7.0.200.0910.03479.01
7.0.190.1010.02378.79
7.0.180.0870.01978.25
7.0.170.1040.01678.40
7.0.160.0880.02378.27
7.0.150.1030.01678.37
7.0.140.5010.02677.75
7.0.130.5570.03778.37
7.0.120.4740.02678.25
7.0.111.6460.02778.22
7.0.100.1730.02778.34
7.0.90.1320.04378.45
7.0.80.1320.02678.38
7.0.70.1290.04878.41
7.0.60.1180.02978.35
7.0.50.1690.02778.49
7.0.40.0100.02818.73
7.0.30.0040.03218.73
7.0.20.0150.02418.73
7.0.10.0090.02718.73
7.0.00.0100.02518.73
5.6.300.0400.08385.46
5.6.290.0260.11185.62
5.6.280.0300.10785.59
5.6.270.0310.10785.79
5.6.260.0270.10185.79
5.6.250.0350.12585.76
5.6.240.0340.09285.57
5.6.230.0260.12185.59
5.6.220.0510.12385.75
5.6.210.0370.12585.73
5.6.200.0230.10985.49
5.6.190.0410.12985.54
5.6.180.0470.11085.65
5.6.170.0170.11285.65
5.6.160.0270.11685.64
5.6.150.0260.17585.65
5.6.140.0160.10285.64
5.6.130.0140.10785.45
5.6.120.0220.09585.54
5.6.110.0130.10785.53
5.6.100.0260.12885.57
5.6.90.0390.09085.53
5.6.80.0140.12784.93
5.6.70.0260.09685.08
5.6.60.0240.12085.11
5.6.50.0230.15484.95
5.6.40.0270.13784.84
5.6.30.0330.14085.00
5.6.20.0300.10285.00
5.6.10.0270.09985.03
5.6.00.0470.14784.88
5.5.380.0340.08182.36
5.5.370.0240.09882.11
5.5.360.0140.12082.23
5.5.350.0260.09482.29
5.5.340.0260.09882.79
5.5.330.0230.09282.77
5.5.320.0240.10382.77
5.5.310.0200.09982.81
5.5.300.0240.08882.75
5.5.290.0310.08882.62
5.5.280.0710.08182.64
5.5.270.0320.09782.52
5.5.260.0200.14982.74
5.5.250.0170.10082.60
5.5.240.0270.08782.16
5.5.230.0230.10882.07
5.5.220.0520.07882.15
5.5.210.0330.08681.91
5.5.200.0270.08182.14
5.5.190.0360.10482.13
5.5.180.0200.09982.13
5.5.160.0240.09282.04
5.5.150.0340.13882.13
5.5.140.0130.09682.09
5.5.130.0340.09181.88
5.5.120.0190.09082.12
5.5.110.0100.11082.02
5.5.100.0200.10281.90
5.5.90.0210.09981.79
5.5.80.0280.08682.00
5.5.70.0270.09481.98
5.5.60.0330.08781.77
5.5.50.0130.10781.93
5.5.40.0170.10182.02
5.5.30.0200.08481.99
5.5.20.0230.08781.96
5.5.10.0100.10681.96
5.5.00.0200.10281.98
5.4.450.0410.08984.06
5.4.440.0310.11183.87
5.4.430.0170.09983.92
5.4.420.0170.11184.10
5.4.410.0230.09283.76
5.4.400.0270.08783.55
5.4.390.0100.10683.54
5.4.380.0240.09983.54
5.4.370.0200.10283.50
5.4.360.0530.09683.76
5.4.350.0200.10783.76
5.4.340.0200.13883.78
5.4.320.0200.09983.75
5.4.310.0240.11983.64
5.4.300.0300.10183.72
5.4.290.0230.09883.77
5.4.280.0230.12483.62
5.4.270.0300.07983.55
5.4.260.0200.09083.56
5.4.250.0740.08483.59
5.4.240.0240.10383.54
5.4.230.0240.08583.54
5.4.220.0340.08583.59
5.4.210.0170.09783.58
5.4.200.0200.09583.59
5.4.190.0170.10483.56
5.4.180.0210.09383.50
5.4.170.0440.09083.49
5.4.160.0200.10183.73
5.4.150.0200.09583.82
5.4.140.0140.10281.36
5.4.130.0190.08781.13
5.4.120.0270.09181.13
5.4.110.0160.09681.30
5.4.100.0390.10381.10
5.4.90.0430.10081.32
5.4.80.0200.08881.15
5.4.70.0230.08681.28
5.4.60.0200.09581.41
5.4.50.0260.09281.23
5.4.40.0200.09881.29
5.4.30.0300.09481.32
5.4.20.0260.09281.27
5.4.10.0140.11681.25
5.4.00.0310.07880.64
5.3.290.0300.10178.15
5.3.280.0170.09378.16
5.3.270.0260.10278.15
5.3.260.0170.09778.14
5.3.250.0070.10377.93
5.3.240.0140.09578.04
5.3.230.0130.09878.04
5.3.220.0200.09277.90
5.3.210.0270.13978.14
5.3.200.0170.14377.79
5.3.190.0210.08978.11
5.3.180.0200.09978.10
5.3.170.0200.09578.09
5.3.160.0290.11878.05
5.3.150.0230.09778.01
5.3.140.0270.08578.01
5.3.130.0170.09377.88
5.3.120.0200.14678.00
5.3.110.0250.09178.07
5.3.100.0300.10177.16
5.3.90.0190.11777.54
5.3.80.0260.09677.52
5.3.70.0170.11477.49
5.3.60.0230.12477.07
5.3.50.0260.08577.42
5.3.40.0200.10477.02
5.3.30.0130.12177.41
5.3.20.0330.07976.96
5.3.10.0360.08277.07
5.3.00.0330.07977.11

preferences:
42.17 ms | 400 KiB | 5 Q