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($logged) { foreach($this->input as $key=>$value) { echo $key ." ".$value . " " .$logged."\n\n"; if($key == 2 && $logged == false) throw new Exception('hello exception'); } } } function retry(Dummy $dum, $logged = false) { try { $dum->run($logged); } catch(Exception $e) { // solve the exception if(!$logged) $logged = true; retry($dum, $logged); } } $dum = new Dummy; retry($dum, false);

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.0090.00618.30
8.3.50.0100.00821.96
8.3.40.0150.00619.02
8.3.30.0120.00919.09
8.3.20.0030.00520.21
8.3.10.0080.00022.09
8.3.00.0060.00320.64
8.2.180.0120.00916.63
8.2.170.0150.00022.96
8.2.160.0070.01021.07
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0080.00019.12
8.2.110.0030.00722.12
8.2.100.0040.00819.64
8.2.90.0000.00819.22
8.2.80.0050.00318.05
8.2.70.0050.00317.50
8.2.60.0030.00617.80
8.2.50.0030.00518.07
8.2.40.0090.00018.22
8.2.30.0000.00718.07
8.2.20.0040.00417.78
8.2.10.0040.00417.82
8.2.00.0080.00017.70
8.1.280.0140.00725.92
8.1.270.0060.00322.14
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0060.00323.86
8.1.230.0040.00719.07
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0060.00317.63
8.1.180.0000.00818.70
8.1.170.0060.00318.59
8.1.160.0050.00322.04
8.1.150.0020.00518.66
8.1.140.0000.00817.47
8.1.130.0040.00417.84
8.1.120.0070.00017.36
8.1.110.0000.00717.38
8.1.100.0000.00817.50
8.1.90.0040.00417.46
8.1.80.0030.00317.48
8.1.70.0030.00617.37
8.1.60.0000.00817.50
8.1.50.0040.00417.56
8.1.40.0040.00417.55
8.1.30.0060.00317.54
8.1.20.0000.00917.63
8.1.10.0080.00017.62
8.1.00.0080.00017.51
8.0.300.0000.00818.77
8.0.290.0070.00017.04
8.0.280.0000.00718.46
8.0.270.0040.00417.20
8.0.260.0000.00716.89
8.0.250.0070.00016.92
8.0.240.0070.00017.05
8.0.230.0030.00317.02
8.0.220.0050.00216.87
8.0.210.0040.00416.98
8.0.200.0040.00416.89
8.0.190.0000.00817.04
8.0.180.0000.00716.98
8.0.170.0030.00616.99
8.0.160.0040.00417.04
8.0.150.0070.00316.96
8.0.140.0030.00516.98
8.0.130.0060.00013.41
8.0.120.0040.00416.89
8.0.110.0000.00716.93
8.0.100.0000.00717.00
8.0.90.0000.00716.93
8.0.80.0120.00416.97
8.0.70.0000.00816.92
8.0.60.0040.00416.84
8.0.50.0030.00516.91
8.0.30.0020.01717.26
8.0.20.0130.00617.40
8.0.10.0000.00717.01
8.0.00.0080.01116.86
7.4.330.0050.00015.17
7.4.320.0000.00716.48
7.4.300.0000.00616.62
7.4.290.0000.00716.61
7.4.280.0030.00316.46
7.4.270.0040.00416.66
7.4.260.0080.00016.63
7.4.250.0040.00416.59
7.4.240.0040.00416.46
7.4.230.0000.00616.41
7.4.220.0060.01216.50
7.4.210.0110.00416.52
7.4.200.0030.00316.53
7.4.190.0000.00716.69
7.4.160.0100.00616.71
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0050.01416.61
7.4.120.0100.01016.49
7.4.110.0100.00716.54
7.4.100.0090.00916.64
7.4.90.0120.00616.78
7.4.80.0090.00919.39
7.4.70.0160.00316.57
7.4.60.0240.01316.38
7.4.50.0000.00916.41
7.4.40.0070.01022.77
7.4.30.0110.00516.65
7.4.10.0060.01014.89
7.4.00.0080.00914.96
7.3.330.0050.00013.29
7.3.320.0060.00013.24
7.3.310.0030.00316.24
7.3.300.0000.00716.25
7.3.290.0040.01116.44
7.3.280.0050.01116.42
7.3.270.0100.00617.40
7.3.260.0120.00616.50
7.3.250.0170.00716.36
7.3.240.0070.01016.44
7.3.230.0080.00916.41
7.3.210.0120.00616.66
7.3.200.0150.00616.56
7.3.190.0100.00716.34
7.3.180.0130.00316.47
7.3.170.0120.00316.39
7.3.160.0070.01016.59
7.3.130.0110.00714.67
7.3.120.0030.01115.01
7.3.110.0090.00914.56
7.3.100.0070.00715.05
7.3.90.0060.01214.93
7.3.80.0100.00714.98
7.3.70.0130.00014.85
7.3.60.0030.01315.07
7.3.50.0070.01014.68
7.3.40.0030.00714.93
7.3.30.0100.00314.86
7.3.20.0070.00716.55
7.3.10.0000.01116.70
7.3.00.0000.01016.89
7.2.330.0160.00316.45
7.2.320.0060.01616.66
7.2.310.0130.00916.50
7.2.300.0150.00316.77
7.2.290.0080.00816.70
7.2.260.0120.00615.34
7.2.250.0130.00715.06
7.2.240.0000.01515.13
7.2.230.0120.00615.09
7.2.220.0060.01314.73
7.2.210.0030.01015.30
7.2.200.0070.01015.12
7.2.190.0000.00915.13
7.2.180.0000.01115.02
7.2.170.0000.01814.89
7.2.160.0000.01515.24
7.2.150.0090.00617.12
7.2.140.0070.00717.02
7.2.130.0000.01516.85
7.2.120.0040.00917.02
7.2.110.0040.01216.70
7.2.100.0000.01516.99
7.2.90.0100.00717.06
7.2.80.0060.00916.84
7.2.70.0030.00916.96
7.2.60.0080.00317.01
7.2.50.0040.01016.95
7.2.40.0000.00917.08
7.2.30.0060.00917.20
7.2.20.0100.00616.91
7.2.10.0030.01016.96
7.2.00.0000.00916.94
7.1.330.0030.01015.73
7.1.320.0070.01115.70
7.1.310.0070.00715.81
7.1.300.0070.00715.87
7.1.290.0040.01115.59
7.1.280.0090.00615.68
7.1.270.0090.00015.96
7.1.260.0030.00715.81
7.1.250.0090.00315.61
7.1.240.0030.00715.43
7.1.230.0100.00315.88
7.1.220.0070.00715.59
7.1.210.0040.01115.80
7.1.200.0030.00815.77
7.1.190.0060.00615.57
7.1.180.0040.00415.79
7.1.170.0040.00715.84
7.1.160.0060.00615.72
7.1.150.0100.00015.61
7.1.140.0030.00615.84
7.1.130.0030.01115.83
7.1.120.0030.01015.91
7.1.110.0000.01615.80
7.1.100.0070.00715.84
7.1.90.0060.00916.06
7.1.80.0060.00615.79
7.1.70.0080.00116.26
7.1.60.0060.00816.45
7.1.50.0080.00516.39
7.1.40.0020.01116.34
7.1.30.0060.00616.31
7.1.20.0050.00616.30
7.1.10.0020.01116.39
7.1.00.0050.00516.33
7.0.330.0090.00315.48
7.0.320.0030.01015.58
7.0.310.0030.01015.45
7.0.300.0000.01115.46
7.0.290.0000.01315.16
7.0.280.0030.00715.04
7.0.270.0030.00615.55
7.0.260.0090.00615.26
7.0.250.0000.01315.65
7.0.240.0140.00315.19
7.0.230.0090.00615.40
7.0.220.0090.00315.44
7.0.210.0040.00815.34
7.0.200.0050.00516.19
7.0.190.0030.00916.22
7.0.180.0060.00416.21
7.0.170.0040.00616.08
7.0.160.0040.00816.08
7.0.150.0090.00616.25
7.0.140.0050.00816.27
7.0.130.0050.00316.28
7.0.120.0030.00716.12
7.0.110.0020.00616.24
7.0.100.0130.00216.19
7.0.90.0050.00716.19
7.0.80.0070.00216.21
7.0.70.0080.00516.16
7.0.60.0040.00516.18
7.0.50.0040.00716.26
7.0.40.0030.00915.27
7.0.30.0040.00915.15
7.0.20.0090.00515.19
7.0.10.0060.00515.18
7.0.00.0000.01115.10
5.6.400.0070.00714.41
5.6.390.0030.01414.26
5.6.380.0040.00814.75
5.6.370.0040.01114.40
5.6.360.0040.01114.64
5.6.350.0090.00614.29
5.6.340.0060.00914.53
5.6.330.0030.00714.21
5.6.320.0040.01214.34
5.6.310.0030.01314.38
5.6.300.0050.02317.64
5.6.290.0170.02217.41
5.6.280.0030.02817.61
5.6.270.0100.01917.82
5.6.260.0100.02017.76
5.6.250.0030.02817.79
5.6.240.0060.02517.66
5.6.230.0060.02317.48
5.6.220.0050.04717.61
5.6.210.0030.02917.83
5.6.200.0070.02417.66
5.6.190.0050.02717.64
5.6.180.0020.02617.74
5.6.170.0050.02517.50
5.6.160.0050.02317.64
5.6.150.0070.02417.57
5.6.140.0050.02617.65
5.6.130.0020.02817.62
5.6.120.0060.02617.68
5.6.110.0070.02217.57
5.6.100.0090.02517.56
5.6.90.0030.02617.78
5.6.80.0040.02517.22
5.6.70.0050.02317.32
5.6.60.0070.02517.22
5.6.50.0050.02317.47
5.6.40.0060.02317.47
5.6.30.0070.02117.44
5.6.20.0020.02517.41
5.6.10.0030.02217.20
5.6.00.0000.02617.25
5.5.380.0100.01715.92
5.5.370.0050.02515.98
5.5.360.0030.03316.00
5.5.350.0050.02815.79
5.5.340.0030.02616.06
5.5.330.0090.02016.16
5.5.320.0100.02816.24
5.5.310.0060.02416.21
5.5.300.0030.02616.13
5.5.290.0020.02816.13
5.5.280.0000.02816.18
5.5.270.0060.02216.17
5.5.260.0020.02816.32
5.5.250.0000.03116.09
5.5.240.0060.02015.82
5.5.230.0060.02215.78
5.5.220.0050.02215.80
5.5.210.0040.02115.85
5.5.200.0020.02415.83
5.5.190.0000.03015.69
5.5.180.0060.02115.78
5.5.170.0030.00514.44
5.5.160.0020.02115.65
5.5.150.0070.02715.73
5.5.140.0050.02915.93
5.5.130.0030.02215.66
5.5.120.0090.02015.62
5.5.110.0090.02715.88
5.5.100.0030.02515.71
5.5.90.0060.02215.81
5.5.80.0030.02415.81
5.5.70.0070.02415.83
5.5.60.0020.02615.65
5.5.50.0050.02315.85
5.5.40.0060.02115.72
5.5.30.0050.02315.91
5.5.20.0070.02215.76
5.5.10.0060.02115.66
5.5.00.0020.02815.77
5.4.450.0060.02515.15
5.4.440.0050.02215.37
5.4.430.0180.02815.32
5.4.420.0020.02415.24
5.4.410.0020.02315.15
5.4.400.0040.02014.98
5.4.390.0110.01715.22
5.4.380.0030.02415.06
5.4.370.0010.02715.03
5.4.360.0070.02114.95
5.4.350.0050.02215.13
5.4.340.0000.02515.09
5.4.330.0000.01211.06
5.4.320.0070.04115.07
5.4.310.0040.02215.13
5.4.300.0060.01915.10
5.4.290.0040.02214.90
5.4.280.0030.02415.09
5.4.270.0030.02414.98
5.4.260.0030.02415.14
5.4.250.0050.01915.32
5.4.240.0040.02115.12
5.4.230.0030.02015.02
5.4.220.0050.02215.05
5.4.210.0020.02815.05
5.4.200.0030.02514.89
5.4.190.0010.02515.03
5.4.180.0180.01515.04
5.4.170.0030.02414.95
5.4.160.0050.02114.93
5.4.150.0000.02315.08
5.4.140.0060.03013.96
5.4.130.0040.01914.17
5.4.120.0040.01914.07
5.4.110.0040.02014.07
5.4.100.0020.02214.06
5.4.90.0030.02114.08
5.4.80.0000.02614.07
5.4.70.0020.02214.08
5.4.60.0000.03714.14
5.4.50.0040.02114.04
5.4.40.0030.02413.88
5.4.30.0050.02114.02
5.4.20.0000.02514.01
5.4.10.0060.01814.10
5.4.00.0010.02214.09
5.3.290.0080.02313.92
5.3.280.0020.02413.67
5.3.270.0020.02213.82
5.3.260.0050.02313.78
5.3.250.0000.02313.83
5.3.240.0020.02213.75
5.3.230.0020.02313.78
5.3.220.0020.02513.67
5.3.210.0030.02013.67
5.3.200.0020.02113.57
5.3.190.0050.01913.63
5.3.180.0010.02513.81
5.3.170.0000.03013.66
5.3.160.0030.02413.81
5.3.150.0020.02213.84
5.3.140.0050.01913.75
5.3.130.0030.02213.77
5.3.120.0030.02213.73
5.3.110.0000.02313.67
5.3.100.0050.01613.73
5.3.90.0050.03613.66
5.3.80.0010.02613.71
5.3.70.0080.01713.70
5.3.60.0010.02313.72
5.3.50.0000.02213.67
5.3.40.0040.01913.68
5.3.30.0030.02013.64
5.3.20.0040.02013.82
5.3.10.0110.02013.66
5.3.00.0020.03213.66

preferences:
42.77 ms | 401 KiB | 5 Q