3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NewException extends Exception { //$message is now not optional, just for the extension. public function __construct($message, $code = 0, Exception $previous = null) { parent::__construct($message, $code, $previous); } } /** * TestException * Tests and throws Exceptions. */ class TestException { const NONE = 0; const NORMAL = 1; const CUSTOM = 2; public function __construct($type) { switch ($type) { case 1: throw new Exception('Normal Exception'); break; case 2: throw new NewException('Custom Exception'); break; default: return 0; //No exception is thrown. } } } try { $t = new TestException(TestException::CUSTOM); } catch (Exception $e) { print_r($e); //Exception Caught } ?>

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.0030.01618.97
8.3.30.0070.00719.13
8.3.20.0140.00020.34
8.3.10.0030.01023.66
8.3.00.0130.00719.35
8.2.170.0100.01022.96
8.2.160.0070.00720.39
8.2.150.0130.00624.18
8.2.140.0000.00824.66
8.2.130.0070.01026.16
8.2.120.0080.00022.25
8.2.110.0030.00622.15
8.2.100.0060.00617.84
8.2.90.0040.00419.20
8.2.80.0040.00417.97
8.2.70.0000.00917.38
8.2.60.0040.00418.04
8.2.50.0110.00418.07
8.2.40.0000.00818.03
8.2.30.0040.00418.00
8.2.20.0040.00417.58
8.2.10.0070.00018.14
8.2.00.0090.00017.66
8.1.270.0000.00923.79
8.1.260.0000.00826.35
8.1.250.0120.00628.09
8.1.240.0040.00423.88
8.1.230.0040.00719.04
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0110.00017.48
8.1.190.0000.00917.55
8.1.180.0060.00318.10
8.1.170.0030.00618.61
8.1.160.0070.00021.95
8.1.150.0040.00418.70
8.1.140.0040.00417.38
8.1.130.0000.00717.80
8.1.120.0070.00017.37
8.1.110.0000.00717.39
8.1.100.0080.00017.44
8.1.90.0000.00817.38
8.1.80.0030.00717.38
8.1.70.0030.00317.35
8.1.60.0030.00617.60
8.1.50.0030.00617.44
8.1.40.0000.00717.57
8.1.30.0000.00817.59
8.1.20.0000.00717.58
8.1.10.0000.00717.50
8.1.00.0040.00417.54
8.0.300.0030.00318.77
8.0.290.0000.00717.05
8.0.280.0000.00718.41
8.0.270.0030.00317.17
8.0.260.0000.00716.84
8.0.250.0000.00716.87
8.0.240.0060.00316.97
8.0.230.0000.00716.87
8.0.220.0040.00416.92
8.0.210.0000.00716.82
8.0.200.0000.00716.86
8.0.190.0030.00317.01
8.0.180.0040.00416.92
8.0.170.0080.00016.83
8.0.160.0000.00716.86
8.0.150.0070.00016.88
8.0.140.0080.00016.82
8.0.130.0030.00313.39
8.0.120.0050.00316.89
8.0.110.0030.00516.87
8.0.100.0040.00417.00
8.0.90.0070.00017.01
8.0.80.0080.00817.04
8.0.70.0040.00416.82
8.0.60.0000.00716.88
8.0.50.0040.00416.93
8.0.30.0140.00617.03
8.0.20.0080.01117.40
8.0.10.0000.00817.13
8.0.00.0070.01216.76
7.4.330.0030.00315.03
7.4.320.0060.00016.58
7.4.300.0030.00316.63
7.4.290.0030.00316.45
7.4.280.0030.00316.66
7.4.270.0000.00716.46
7.4.260.0060.00316.49
7.4.250.0040.00416.52
7.4.240.0000.00816.63
7.4.230.0030.00316.55
7.4.220.0150.00316.59
7.4.210.0080.00716.58
7.4.200.0000.00716.65
7.4.190.0000.00716.50
7.4.160.0130.00716.44
7.4.150.0040.01417.40
7.4.140.0120.00717.86
7.4.130.0120.00716.51
7.4.120.0130.00416.57
7.4.110.0070.01116.55
7.4.100.0100.01616.71
7.4.90.0100.00716.63
7.4.80.0140.00319.39
7.4.70.0090.01216.33
7.4.60.0060.01016.46
7.4.50.0040.00016.35
7.4.40.0060.00622.77
7.4.30.0120.00916.50
7.4.10.0060.00914.84
7.4.00.0030.01214.69
7.3.330.0030.00313.40
7.3.320.0050.00013.28
7.3.310.0040.00416.24
7.3.300.0000.00716.34
7.3.290.0140.00316.29
7.3.280.0120.00616.39
7.3.270.0070.01017.40
7.3.260.0090.01216.46
7.3.250.0110.00816.58
7.3.240.0170.00016.36
7.3.230.0050.01116.40
7.3.210.0140.00416.47
7.3.200.0110.00719.39
7.3.190.0070.01316.31
7.3.180.0060.00916.55
7.3.170.0030.01616.50
7.3.160.0060.01016.54
7.3.130.0040.01115.11
7.3.120.0060.01114.84
7.3.110.0090.00914.86
7.3.100.0030.01014.74
7.3.90.0000.01014.93
7.3.80.0030.00814.81
7.3.70.0100.00314.97
7.3.60.0040.00814.72
7.3.50.0090.00614.63
7.3.40.0040.01114.95
7.3.30.0080.00814.97
7.3.20.0100.00316.57
7.3.10.0040.01116.65
7.3.00.0030.00916.38
7.2.330.0070.01116.49
7.2.320.0090.00816.73
7.2.310.0140.00616.37
7.2.300.0100.01316.56
7.2.290.0100.00716.72
7.2.260.0120.00615.11
7.2.250.0040.01214.92
7.2.240.0000.01415.04
7.2.230.0070.01014.92
7.2.220.0060.01014.84
7.2.210.0070.00714.96
7.2.200.0090.00315.06
7.2.190.0070.00614.90
7.2.180.0060.00914.97
7.2.170.0080.00815.12
7.2.160.0100.00615.14
7.2.150.0070.00716.84
7.2.140.0080.00416.67
7.2.130.0030.01016.96
7.2.120.0060.01216.95
7.2.110.0030.01416.91
7.2.100.0030.00716.95
7.2.90.0130.00316.88
7.2.80.0030.01016.70
7.2.70.0040.01116.78
7.2.60.0030.00716.71
7.2.50.0060.00616.85
7.2.40.0000.01116.97
7.2.30.0030.01016.75
7.2.20.0000.01016.69
7.2.10.0070.00716.94
7.2.00.0080.00618.13
7.1.330.0000.01615.58
7.1.320.0060.00615.84
7.1.310.0030.01315.64
7.1.300.0030.00615.52
7.1.290.0030.01315.82
7.1.280.0040.00815.80
7.1.270.0040.00815.80
7.1.260.0110.00415.94
7.1.250.0070.00715.51
7.1.240.0090.00615.62
7.1.230.0040.00815.57
7.1.220.0030.00515.90
7.1.210.0030.01215.72
7.1.200.0030.01215.81
7.1.190.0040.01115.66
7.1.180.0090.00615.55
7.1.170.0030.00715.57
7.1.160.0090.00315.85
7.1.150.0110.00315.57
7.1.140.0110.00015.88
7.1.130.0080.00315.80
7.1.120.0030.00715.52
7.1.110.0070.00715.88
7.1.100.0050.00916.89
7.1.90.0030.01015.90
7.1.80.0040.00415.56
7.1.70.0050.00416.43
7.1.60.0060.01217.53
7.1.50.0080.00816.16
7.1.40.0030.00615.79
7.1.30.0040.00715.79
7.1.20.0030.01015.49
7.1.10.0030.00915.89
7.1.00.0060.04019.04
7.0.330.0070.00715.55
7.0.320.0060.00615.47
7.0.310.0030.00915.06
7.0.300.0000.01415.54
7.0.290.0110.00315.30
7.0.280.0060.01215.41
7.0.270.0080.00815.52
7.0.260.0070.00715.56
7.0.250.0040.00815.20
7.0.240.0090.00615.31
7.0.230.0000.01515.66
7.0.220.0100.00015.54
7.0.210.0100.00315.09
7.0.200.0050.00516.16
7.0.190.0070.00415.55
7.0.180.0040.00415.17
7.0.170.0040.01115.49
7.0.160.0100.00315.25
7.0.150.0060.00615.25
7.0.140.0030.04018.75
7.0.130.0150.00015.09
7.0.120.0090.00315.61
7.0.110.0040.00415.52
7.0.100.0070.04217.69
7.0.90.0170.04717.68
7.0.80.0270.04517.68
7.0.70.0220.04617.63
7.0.60.0270.04217.72
7.0.50.0300.02217.92
7.0.40.0020.02816.67
7.0.30.0050.03616.61
7.0.20.0050.04316.77
7.0.10.0070.04316.84
7.0.00.0030.04416.66
5.6.400.0040.01414.30
5.6.390.0130.00314.51
5.6.380.0000.01714.20
5.6.370.0040.01214.37
5.6.360.0100.00714.25
5.6.350.0060.00313.98
5.6.340.0040.01113.85
5.6.330.0070.00714.22
5.6.320.0070.00714.06
5.6.310.0090.00614.24
5.6.300.0030.01014.36
5.6.290.0030.01014.23
5.6.280.0060.03817.60
5.6.270.0060.00614.33
5.6.260.0060.00314.43
5.6.250.0070.04017.46
5.6.240.0070.04717.56
5.6.230.0030.02917.33
5.6.220.0100.03917.56
5.6.210.0050.04017.63
5.6.200.0080.04317.66
5.6.190.0090.04417.79
5.6.180.0050.02517.50
5.6.170.0100.04017.54
5.6.160.0000.04617.50
5.6.150.0050.03717.58
5.6.140.0090.04417.62
5.6.130.0080.04217.73
5.6.120.0080.04517.52
5.6.110.0080.04317.50
5.6.100.0060.04117.65
5.6.90.0140.04017.64
5.6.80.0050.04217.26
5.6.70.0080.04117.22
5.6.60.0070.04017.31
5.6.50.0060.04517.33
5.6.40.0090.02517.29
5.6.30.0110.04117.23
5.6.20.0070.04617.26
5.6.10.0120.03817.23
5.6.00.0070.04517.22
5.5.380.0050.03517.23
5.5.370.0050.03717.35
5.5.360.0040.03417.14
5.5.350.0030.04717.20
5.5.340.0030.04717.43
5.5.330.0080.04317.44
5.5.320.0110.04117.49
5.5.310.0070.03017.45
5.5.300.0110.03717.41
5.5.290.0100.03817.51
5.5.280.0050.04817.42
5.5.270.0070.04317.42
5.5.260.0080.04017.61
5.5.250.0070.04317.30
5.5.240.0050.04717.09
5.5.230.0080.04017.05
5.5.220.0040.03016.97
5.5.210.0030.03217.24
5.5.200.0100.04017.23
5.5.190.0050.02817.10
5.5.180.0030.04617.21
5.5.170.0040.01214.10
5.5.160.0080.04117.22
5.5.150.0070.04217.06
5.5.140.0070.05417.10
5.5.130.0000.03817.12
5.5.120.0100.03317.10
5.5.110.0080.04017.07
5.5.100.0030.04117.08
5.5.90.0080.04217.10
5.5.80.0080.02317.06
5.5.70.0030.05017.00
5.5.60.0080.02117.12
5.5.50.0140.03417.02
5.5.40.0100.04116.96
5.5.30.0100.04216.88
5.5.20.0030.03517.10
5.5.10.0040.04416.78
5.5.00.0100.04016.93
5.4.450.0050.02315.04
5.4.440.0100.03715.25
5.4.430.0080.03715.11
5.4.420.0130.02515.17
5.4.410.0050.04315.26
5.4.400.0050.02514.92
5.4.390.0100.04015.07
5.4.380.0120.03514.86
5.4.370.0050.04014.85
5.4.360.0050.02614.97
5.4.350.0020.04514.95
5.4.340.0080.03815.06
5.4.330.0060.00610.98
5.4.320.0020.04014.94
5.4.310.0070.04014.96
5.4.300.0020.03814.85
5.4.290.0070.04114.82
5.4.280.0060.03715.06
5.4.270.0080.03615.05
5.4.260.0060.04114.83
5.4.250.0070.04114.81
5.4.240.0010.04615.15
5.4.230.0090.03414.89
5.4.220.0020.03815.03
5.4.210.0050.02715.03
5.4.200.0080.03414.91
5.4.190.0080.04315.22
5.4.180.0030.04615.03
5.4.170.0030.04214.90
5.4.160.0090.03615.01
5.4.150.0050.02215.01
5.4.140.0090.03913.65
5.4.130.0060.03713.59
5.4.120.0050.04213.58
5.4.110.0070.04013.64
5.4.100.0070.02313.76
5.4.90.0080.03413.61
5.4.80.0030.03813.75
5.4.70.0050.04013.81
5.4.60.0070.03713.78
5.4.50.0050.04213.46
5.4.40.0100.03313.71
5.4.30.0020.02913.69
5.4.20.0070.02013.74
5.4.10.0080.03313.52
5.4.00.0120.03413.48
5.3.290.0040.04612.64
5.3.280.0080.02112.52
5.3.270.0050.02412.61
5.3.260.0050.04312.65
5.3.250.0070.02912.55
5.3.240.0040.03912.60
5.3.230.0070.03612.41
5.3.220.0130.03012.38
5.3.210.0070.03312.57
5.3.200.0050.04312.46
5.3.190.0100.03812.60
5.3.180.0080.03612.59
5.3.170.0070.03512.69
5.3.160.0050.03812.62
5.3.150.0080.02112.54
5.3.140.0100.03812.59
5.3.130.0050.02412.51
5.3.120.0030.04012.49
5.3.110.0120.01812.42
5.3.100.0050.03312.31
5.3.90.0100.03612.24
5.3.80.0060.02312.20
5.3.70.0050.03712.33
5.3.60.0020.03212.29
5.3.50.0050.02912.23
5.3.40.0130.02712.19
5.3.30.0000.04412.11
5.3.20.0050.03512.17
5.3.10.0060.03712.05
5.3.00.0020.03911.98
5.2.170.0070.06711.09
5.2.160.0170.04711.07
5.2.150.0030.06311.07
5.2.140.0070.05711.23
5.2.130.0000.06011.23
5.2.120.0070.05311.11
5.2.110.0000.03311.04
5.2.100.0030.06311.10
5.2.90.0030.06311.23
5.2.80.0000.06311.16
5.2.70.0100.04011.24
5.2.60.0000.03311.09
5.2.50.0070.04311.17
5.2.40.0000.06010.90
5.2.30.0030.06311.00
5.2.20.0070.05010.96
5.2.10.0030.06010.90
5.2.00.0000.06310.66
5.1.60.0070.05010.13
5.1.50.0070.0509.84
5.1.40.0030.0509.97
5.1.30.0000.04010.25
5.1.20.0070.02710.22
5.1.10.0000.05710.07
5.1.00.0030.0539.96
5.0.50.0100.0408.39
5.0.40.0000.0438.47
5.0.30.0070.0638.12
5.0.20.0030.0438.24
5.0.10.0100.0278.17
5.0.00.0030.0608.23
4.4.90.0030.0177.68
4.4.80.0030.0237.68
4.4.70.0000.0377.68
4.4.60.0000.0407.68
4.4.50.0000.0377.68
4.4.40.0070.0477.68
4.4.30.0000.0337.68
4.4.20.0070.0277.68
4.4.10.0000.0377.68
4.4.00.0030.0577.68
4.3.110.0030.0307.68
4.3.100.0030.0377.68
4.3.90.0070.0307.68
4.3.80.0000.0537.68
4.3.70.0000.0377.68
4.3.60.0030.0277.68
4.3.50.0070.0307.68
4.3.40.0000.0537.68
4.3.30.0000.0377.68
4.3.20.0030.0337.68
4.3.10.0030.0337.68
4.3.00.0000.0377.68

preferences:
57.7 ms | 400 KiB | 5 Q