3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dummy { 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'); } } } $dum = new Dummy; $dum->run();

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.0150.00618.55
8.3.50.0110.00921.14
8.3.40.0070.00718.98
8.3.30.0060.00920.20
8.3.20.0040.00420.16
8.3.10.0000.00822.09
8.3.00.0050.00322.40
8.2.180.0030.01418.67
8.2.170.0110.00422.96
8.2.160.0100.00320.37
8.2.150.0090.00024.18
8.2.140.0150.00024.66
8.2.130.0000.01926.16
8.2.120.0040.00419.64
8.2.110.0070.00321.05
8.2.100.0060.00617.72
8.2.90.0040.00417.97
8.2.80.0080.00019.13
8.2.70.0080.00018.04
8.2.60.0040.00418.04
8.2.50.0030.00518.10
8.2.40.0000.00720.42
8.2.30.0040.00418.13
8.2.20.0020.00517.66
8.2.10.0070.00017.67
8.2.00.0000.00917.62
8.1.280.0120.00625.92
8.1.270.0090.00024.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0100.01322.51
8.1.230.0080.00420.96
8.1.220.0000.00817.79
8.1.210.0050.00319.04
8.1.200.0050.00317.35
8.1.190.0000.00718.88
8.1.180.0090.00018.10
8.1.170.0030.00518.57
8.1.160.0030.00322.14
8.1.150.0080.00018.68
8.1.140.0050.00217.38
8.1.130.0030.00317.89
8.1.120.0000.00817.43
8.1.110.0000.00717.44
8.1.100.0000.00817.50
8.1.90.0000.00717.52
8.1.80.0000.00717.52
8.1.70.0000.00717.43
8.1.60.0040.00417.60
8.1.50.0040.00417.40
8.1.40.0040.00417.46
8.1.30.0040.00417.56
8.1.20.0030.00617.66
8.1.10.0040.00417.48
8.1.00.0030.00617.47
8.0.300.0090.00020.04
8.0.290.0030.00616.75
8.0.280.0040.00418.49
8.0.270.0050.00317.31
8.0.260.0000.00616.80
8.0.250.0030.00317.06
8.0.240.0000.00816.91
8.0.230.0030.00317.06
8.0.220.0000.00716.86
8.0.210.0040.00416.94
8.0.200.0030.00317.02
8.0.190.0070.00416.91
8.0.180.0040.00416.91
8.0.170.0090.00016.88
8.0.160.0000.00816.86
8.0.150.0040.00416.89
8.0.140.0000.00816.94
8.0.130.0030.00313.43
8.0.120.0000.00816.96
8.0.110.0000.00716.77
8.0.100.0050.00316.84
8.0.90.0040.00416.84
8.0.80.0040.01116.94
8.0.70.0040.00416.94
8.0.60.0040.00417.00
8.0.50.0000.00816.99
8.0.30.0100.00817.12
8.0.20.0100.00917.40
8.0.10.0000.00716.97
8.0.00.0120.00716.77
7.4.330.0030.00315.15
7.4.320.0000.00616.53
7.4.300.0070.00016.53
7.4.290.0030.00316.57
7.4.280.0040.00416.59
7.4.270.0030.00316.46
7.4.260.0050.00316.48
7.4.250.0070.00016.61
7.4.240.0030.00416.50
7.4.230.0030.00616.70
7.4.220.0180.00016.41
7.4.210.0060.01016.56
7.4.200.0070.00016.45
7.4.190.0030.00616.68
7.4.160.0080.00816.55
7.4.150.0170.00017.40
7.4.140.0150.00317.86
7.4.130.0120.00516.55
7.4.120.0060.01116.55
7.4.110.0130.00616.55
7.4.100.0000.01716.63
7.4.90.0090.00916.55
7.4.80.0100.00619.39
7.4.70.0070.01016.57
7.4.60.0150.03416.50
7.4.50.0000.00516.31
7.4.40.0000.01322.77
7.4.30.0060.01516.47
7.4.00.0090.00614.82
7.3.330.0050.00013.16
7.3.320.0000.00513.12
7.3.310.0070.00016.36
7.3.300.0000.00716.41
7.3.290.0000.01716.32
7.3.280.0050.01216.36
7.3.270.0160.01017.40
7.3.260.0070.01616.40
7.3.250.0100.00716.49
7.3.240.0100.00716.61
7.3.230.0090.00916.48
7.3.210.0000.01616.48
7.3.200.0070.01019.39
7.3.190.0090.00916.56
7.3.180.0110.00516.38
7.3.170.0030.01316.65
7.3.160.0100.00616.37
7.3.120.0090.00615.13
7.2.330.0130.01016.73
7.2.320.0110.00616.69
7.2.310.0080.00816.64
7.2.300.0100.00616.55
7.2.290.0040.01116.49
7.2.60.0030.01416.75
7.2.50.0090.00016.98
7.2.00.0040.01519.21
7.1.200.0080.00315.74
7.1.70.0000.01017.09
7.1.60.0060.00619.29
7.1.50.0100.01416.84
7.1.00.0170.06722.42
7.0.200.0060.00916.73
7.0.140.0000.07022.01
7.0.60.0000.04320.05
7.0.50.0000.04717.89
7.0.40.0130.05720.40
7.0.30.0530.08020.05
7.0.20.0270.07720.07
7.0.10.0070.06320.25
7.0.00.0070.09020.25
5.6.280.0030.07321.14
5.6.210.0170.07320.63
5.6.200.0100.06318.20
5.6.190.0030.05320.67
5.6.180.0200.04020.50
5.6.170.0370.06020.56
5.6.160.0070.08320.38
5.6.150.0100.03718.18
5.6.140.0030.08718.26
5.6.130.0070.07018.27
5.6.120.0030.04320.76
5.6.110.0130.04720.95
5.6.100.0230.06721.03
5.6.90.0030.07021.04
5.6.80.0000.07720.52
5.5.350.0300.07020.39
5.5.340.0100.08018.09
5.5.330.0030.05020.40
5.5.320.0300.04020.27
5.5.310.0330.04320.29
5.5.300.0070.07318.08
5.5.290.0130.07717.94
5.5.280.0100.06720.81
5.5.270.0170.05020.87
5.5.260.0100.08020.73
5.5.250.0130.06320.78
5.5.240.0130.05320.27
5.4.450.0370.06019.39
5.4.440.1600.05319.47
5.4.430.0900.06719.41
5.4.420.1100.04019.29
5.4.410.0070.05718.81
5.4.400.0400.05718.73
5.4.390.0370.07318.72
5.4.380.0230.05718.79
5.4.370.0130.06018.46
5.4.360.0300.05018.52
5.4.350.0080.03512.02
5.4.340.0100.03612.02
5.4.320.0070.03912.50
5.4.310.0120.04012.50
5.4.300.0080.03312.50
5.4.290.0070.04212.50
5.4.280.0040.03712.40
5.4.270.0070.04312.40
5.4.260.0200.06018.77
5.4.250.0230.05718.81
5.4.240.0100.07018.80
5.4.230.0000.05718.79
5.4.220.0130.06718.73
5.4.210.0100.04718.87
5.4.200.0170.04318.97
5.4.190.0070.05019.02
5.4.180.0070.05318.95
5.4.170.0070.06318.74
5.4.160.0130.04718.91
5.4.150.0070.05718.86
5.4.140.0030.05316.43
5.4.130.0070.04716.57
5.4.120.0070.06016.46
5.4.110.0000.05716.34
5.4.100.0070.06716.37
5.4.90.0070.04716.64
5.4.80.0200.03316.36
5.4.70.0030.05016.48
5.4.60.0070.05316.37
5.4.50.0200.05716.35
5.4.40.0100.04316.48
5.4.30.0070.04716.34
5.4.20.0030.05016.55
5.4.10.0100.05016.50
5.4.00.0170.03716.02
5.3.290.0040.04212.80
5.3.280.0000.05714.68
5.3.270.0070.05314.78
5.3.260.0000.05714.61
5.3.250.0070.05714.70
5.3.240.0070.07014.67
5.3.230.0000.05314.69
5.3.220.0030.05314.65
5.3.210.0100.05014.79
5.3.200.0130.04314.75
5.3.190.0070.05014.67
5.3.180.0100.04714.65
5.3.170.0030.05314.54
5.3.160.0100.04714.47
5.3.150.0170.04314.55
5.3.140.0070.07314.56
5.3.130.0030.05314.69
5.3.120.0030.05714.71
5.3.110.0130.04314.46
5.3.100.0100.05014.04
5.3.90.0030.06314.10
5.3.80.0030.05714.11
5.3.70.0100.04714.03
5.3.60.0030.05314.08
5.3.50.0000.05314.18
5.3.40.0100.05713.93
5.3.30.0030.05013.74
5.3.20.0100.04313.72
5.3.10.0070.04713.74
5.3.00.0170.03713.71
5.2.170.0000.04711.23
5.2.160.0000.04311.37
5.2.150.0070.05311.05
5.2.140.0100.03711.23
5.2.130.0070.03711.17
5.2.120.0030.04011.01
5.2.110.0070.04011.00
5.2.100.0030.04011.02
5.2.90.0000.04711.01
5.2.80.0100.03711.00
5.2.70.0000.06011.10
5.2.60.0030.04311.13
5.2.50.0000.04311.03
5.2.40.0070.04011.22
5.2.30.0000.06311.14
5.2.20.0070.03711.18
5.2.10.0170.04011.03
5.2.00.0030.04310.80
5.1.60.0130.0309.86
5.1.50.0100.02710.04
5.1.40.0030.0409.96
5.1.30.0070.03310.41
5.1.20.0100.03010.42
5.1.10.0100.04310.04
5.1.00.0070.03710.07
5.0.50.0030.0278.46
5.0.40.0030.0278.41
5.0.30.0070.0378.27
5.0.20.0100.0208.11
5.0.10.0030.0408.23
5.0.00.0000.0578.26
4.4.90.0030.0207.46
4.4.80.0030.0207.46
4.4.70.0100.0137.46
4.4.60.0070.0177.46
4.4.50.0030.0207.46
4.4.40.0030.0377.46
4.4.30.0000.0237.46
4.4.20.0070.0277.46
4.4.10.0070.0177.46
4.4.00.0070.0277.46
4.3.110.0030.0207.46
4.3.100.0070.0177.46
4.3.90.0030.0207.46
4.3.80.0070.0377.46
4.3.70.0000.0207.46
4.3.60.0000.0237.46
4.3.50.0000.0337.46
4.3.40.0130.0237.46
4.3.30.0000.0307.46
4.3.20.0030.0307.46
4.3.10.0030.0207.46
4.3.00.0070.0206.88

preferences:
41.66 ms | 401 KiB | 5 Q