3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NotBarException extends Exception {} class NotFooException extends Exception {} try { $foo = "bar"; if ($foo != "bar") { throw new NotBarException("Variable not set to 'bar'!"); } if ($foo != "foo") { throw new NotFooException("Variable not set to 'foo'!"); } } catch(NotBarException $exception) { print "NotBarException\n"; } catch (NotFooException $exception) { print "NotFooException\n"; } catch (Exception $exception) { print get_class($exception)." Exception\n"; }

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.0070.01118.82
8.3.30.0090.00619.09
8.3.20.0040.00420.35
8.3.10.0040.00423.66
8.3.00.0000.00819.26
8.2.170.0070.01422.96
8.2.160.0070.01020.52
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00722.16
8.2.110.0050.00522.05
8.2.100.0110.00017.90
8.2.90.0040.00419.17
8.2.80.0000.00818.02
8.2.70.0110.00017.63
8.2.60.0080.00018.05
8.2.50.0040.00818.07
8.2.40.0040.00418.22
8.2.30.0050.00317.88
8.2.20.0000.00817.70
8.2.10.0040.00418.04
8.2.00.0000.01017.82
8.1.270.0030.00623.96
8.1.260.0070.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0040.00719.18
8.1.220.0040.00417.75
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.43
8.1.180.0000.00818.10
8.1.170.0050.00318.65
8.1.160.0040.00422.00
8.1.150.0000.00718.56
8.1.140.0040.00417.38
8.1.130.0030.00517.83
8.1.120.0000.00717.49
8.1.110.0000.00817.47
8.1.100.0050.00217.47
8.1.90.0060.00317.38
8.1.80.0000.00717.48
8.1.70.0030.00317.46
8.1.60.0040.00717.60
8.1.50.0080.00017.52
8.1.40.0040.00417.55
8.1.30.0030.00517.60
8.1.20.0040.00417.52
8.1.10.0030.00617.55
8.1.00.0040.00417.54
8.0.300.0040.00420.59
8.0.290.0000.00817.17
8.0.280.0070.00018.50
8.0.270.0000.00717.19
8.0.260.0060.00017.13
8.0.250.0030.00316.86
8.0.240.0060.00016.99
8.0.230.0000.00716.87
8.0.220.0000.00716.90
8.0.210.0080.00016.84
8.0.200.0000.00616.85
8.0.190.0000.00816.80
8.0.180.0030.00516.82
8.0.170.0000.00916.93
8.0.160.0040.00416.99
8.0.150.0000.00716.80
8.0.140.0000.00716.82
8.0.130.0000.00613.39
8.0.120.0040.00416.93
8.0.110.0040.00416.84
8.0.100.0040.00416.89
8.0.90.0040.00416.90
8.0.80.0110.00417.00
8.0.70.0000.00717.00
8.0.60.0000.00816.96
8.0.50.0040.00416.90
8.0.30.0100.01217.19
8.0.20.0100.01017.40
8.0.10.0000.00817.07
8.0.00.0100.00816.83
7.4.330.0050.00015.19
7.4.320.0040.00416.58
7.4.300.0000.00716.65
7.4.290.0000.00716.52
7.4.280.0080.00016.51
7.4.270.0000.00716.45
7.4.260.0080.00016.63
7.4.250.0000.00716.54
7.4.240.0030.00416.51
7.4.230.0030.00316.69
7.4.220.0140.00316.54
7.4.210.0090.00716.56
7.4.200.0070.00016.63
7.4.190.0070.00016.57
7.4.160.0140.00316.64
7.4.150.0150.00917.40
7.4.140.0080.01217.86
7.4.130.0080.01016.52
7.4.120.0060.01116.54
7.4.110.0110.00716.50
7.4.100.0100.01016.63
7.4.90.0100.01316.23
7.4.80.0110.00719.39
7.4.70.0190.00616.36
7.4.60.0060.01016.45
7.4.50.0050.00016.31
7.4.40.0070.00722.77
7.4.30.0150.00316.29
7.4.00.0050.01315.01
7.3.330.0000.00613.23
7.3.320.0000.00513.36
7.3.310.0080.00016.42
7.3.300.0040.00416.36
7.3.290.0110.00416.38
7.3.280.0060.00816.34
7.3.270.0110.00617.40
7.3.260.0170.00016.54
7.3.250.0120.00816.64
7.3.240.0110.00716.46
7.3.230.0060.01016.39
7.3.210.0030.01416.38
7.3.200.0170.00016.40
7.3.190.0090.00916.56
7.3.180.0060.00916.54
7.3.170.0090.00616.61
7.3.160.0070.01116.38
7.3.120.0060.01014.77
7.3.110.0060.00915.08
7.3.100.0100.00314.74
7.3.90.0040.01114.65
7.3.80.0040.00814.73
7.3.70.0040.00814.89
7.3.60.0030.01214.69
7.3.50.0000.01214.48
7.3.40.0000.01014.86
7.3.30.0060.00914.86
7.3.20.0110.00416.56
7.3.10.0090.00516.65
7.3.00.0020.01016.58
7.2.330.0110.00616.70
7.2.320.0160.00616.75
7.2.310.0060.00916.73
7.2.300.0110.00616.69
7.2.290.0100.00616.64
7.2.250.0040.01515.20
7.2.240.0030.01015.05
7.2.230.0000.00915.11
7.2.220.0060.00315.26
7.2.210.0030.00915.02
7.2.200.0000.01714.98
7.2.190.0000.01214.91
7.2.180.0070.00714.91
7.2.170.0000.01114.78
7.2.130.0070.00716.97
7.2.120.0090.00616.86
7.2.110.0030.00616.99
7.2.100.0090.00316.61
7.2.90.0030.00916.98
7.2.80.0070.01016.87
7.2.70.0140.00316.83
7.2.60.0000.01516.68
7.2.50.0030.00916.91
7.2.40.0060.00616.99
7.2.30.0060.00617.03
7.2.20.0000.01116.66
7.2.10.0100.00016.72
7.2.00.0050.00817.92
7.1.330.0150.00015.66
7.1.320.0110.00415.49
7.1.310.0030.00615.66
7.1.300.0060.00315.59
7.1.290.0080.00315.42
7.1.280.0080.00515.62
7.1.270.0060.00315.63
7.1.260.0070.00415.65
7.1.250.0000.01015.52
7.1.100.0030.00817.91
7.1.70.0090.00617.06
7.1.60.0130.00319.33
7.1.50.0120.00916.97
7.1.00.0030.07722.36
7.0.200.0070.00316.70
7.0.140.0000.07721.91
7.0.60.0170.08019.77
7.0.50.0030.08717.89
7.0.40.0030.04320.29
7.0.30.0170.05720.24
7.0.20.0300.07020.05
7.0.10.0070.09320.06
7.0.00.0030.08720.25
5.6.280.0070.06721.13
5.6.210.0100.07720.57
5.6.200.0100.07718.16
5.6.190.0030.06720.50
5.6.180.0370.07020.50
5.6.170.0270.04020.56
5.6.160.0130.07720.44
5.6.150.0070.05318.12
5.6.140.0100.07018.16
5.6.130.0100.07018.23
5.6.120.0030.04021.13
5.6.110.0070.06720.99
5.6.100.0100.08321.05
5.6.90.0170.07321.14
5.6.80.0200.07020.49
5.6.70.3800.04020.51
5.5.350.0100.07720.40
5.5.340.0130.07317.95
5.5.330.0000.04720.27
5.5.320.0030.08320.35
5.5.310.0270.07320.19
5.5.300.0100.08018.01
5.5.290.0130.06318.03
5.5.280.0000.04720.88
5.5.270.0070.09020.84
5.5.260.0070.06720.89
5.5.250.0170.07720.72
5.5.240.0270.07320.27
5.4.450.0200.06319.61
5.4.440.0800.06319.16
5.4.430.0200.05719.71
5.4.420.0930.06319.46
5.4.410.0970.07019.26
5.4.400.0270.06019.23
5.4.390.0900.06019.17
5.4.380.0100.06718.63
5.4.370.0470.04718.70
5.4.360.0330.05318.73
5.4.350.0200.05318.48
5.4.340.0170.05718.51
5.4.320.0080.03612.51
5.4.310.0080.03912.50
5.4.300.0060.03712.51
5.4.290.0090.04412.50
5.4.280.0030.05212.38
5.4.270.0070.03712.37
5.4.260.0100.03712.38
5.4.250.0060.04012.38
5.4.240.0070.04112.38
5.4.230.0070.06412.37
5.4.220.0090.05212.37
5.4.210.0130.05212.36
5.4.200.0100.05212.37
5.4.190.0100.05012.37
5.4.180.0060.04012.37
5.4.170.0100.04012.38
5.4.160.0080.03712.37
5.4.150.0120.04412.36
5.4.140.0110.05912.05
5.4.130.0070.04812.04
5.4.120.0100.05112.00
5.4.110.0090.06412.00
5.4.100.0250.06711.99
5.4.90.0070.06911.99
5.4.80.0130.06211.99
5.4.70.0160.04811.99
5.4.60.0120.04911.98
5.4.50.0130.05611.98
5.4.40.0130.05111.98
5.4.30.0200.07311.97
5.4.20.0180.09511.97
5.4.10.0100.03611.97
5.4.00.0180.09311.46
5.3.290.0100.04812.80
5.3.280.0200.07112.71
5.3.270.0130.06112.72
5.3.260.0260.09212.72
5.3.250.0160.07712.72
5.3.240.0200.07012.72
5.3.230.0070.07212.71
5.3.220.0140.05612.68
5.3.210.0130.05812.68
5.3.200.0080.06012.68
5.3.190.0150.06812.68
5.3.180.0180.06512.67
5.3.170.0170.07612.67
5.3.160.0200.06512.67
5.3.150.0150.07112.67
5.3.140.0670.07112.66
5.3.130.0090.05512.66
5.3.120.0110.06212.66
5.3.110.0200.06212.65
5.3.100.0160.07812.12
5.3.90.0130.06812.09
5.3.80.0210.09012.08
5.3.70.0240.07912.07
5.3.60.0120.06312.07
5.3.50.0160.08412.00
5.3.40.0090.05012.00
5.3.30.0180.04511.96
5.3.20.0090.04911.75
5.3.10.0100.05211.71
5.3.00.0180.06411.70
5.2.170.0050.0669.19
5.2.160.0070.0409.19
5.2.150.0120.0629.19
5.2.140.0290.0439.18
5.2.130.0030.0469.14
5.2.120.0190.0569.14
5.2.110.0090.0439.16
5.2.100.0170.0849.15
5.2.90.0050.0619.15
5.2.80.0150.0609.15
5.2.70.0180.0419.14
5.2.60.0090.0499.09
5.2.50.0070.0519.07
5.2.40.0170.0649.05
5.2.30.0130.0609.02
5.2.20.0210.0569.01
5.2.10.0070.0398.93
5.2.00.0050.0498.79
5.1.60.0130.0438.07
5.1.50.0100.0338.07
5.1.40.0110.0358.06
5.1.30.0120.0548.41
5.1.20.0200.0608.43
5.1.10.0170.0538.15
5.1.00.0170.0498.15
5.0.50.0160.0476.63
5.0.40.0120.0466.49
5.0.30.0150.0636.30
5.0.20.0160.0286.27
5.0.10.0110.0266.25
5.0.00.0090.0406.24
4.4.90.0050.0184.78
4.4.80.0040.0244.76
4.4.70.0050.0254.76
4.4.60.0080.0374.75
4.4.50.0070.0254.77
4.4.40.0060.0304.71
4.4.30.0050.0214.76
4.4.20.0080.0214.85
4.4.10.0110.0284.84
4.4.00.0110.0584.76
4.3.110.0060.0274.67
4.3.100.0080.0234.67
4.3.90.0080.0214.64
4.3.80.0050.0514.59
4.3.70.0060.0234.63
4.3.60.0040.0414.62
4.3.50.0130.0374.63
4.3.40.0040.0394.54
4.3.30.0090.0433.28
4.3.20.0050.0223.26
4.3.10.0040.0413.23
4.3.00.0070.03010.37

preferences:
45.24 ms | 400 KiB | 5 Q