3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ExceptionA extends Exception {} class ExceptionB extends ExceptionA {} class ExceptionTest { public function example() { try { throw new ExceptionB(); } catch ( ExceptionB $e ) { echo 'ExceptionB was caught'; } catch ( ExceptionA $e ) { echo 'ExceptionA was caught'; } catch ( Exception $e ) { echo 'Exception was caught'; } } } (new ExceptionTest())->example();

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.0110.00318.55
8.3.50.0180.00316.36
8.3.40.0070.00718.67
8.3.30.0060.00918.71
8.3.20.0080.00020.60
8.3.10.0060.00722.49
8.3.00.0110.00120.49
8.2.180.0070.01118.41
8.2.170.0120.00622.96
8.2.160.0120.00622.16
8.2.150.0090.00025.66
8.2.140.0110.00122.99
8.2.130.0070.00523.53
8.2.120.0070.00520.92
8.2.110.0100.00421.18
8.2.100.0130.00319.42
8.2.90.0100.00719.34
8.2.80.0070.00619.73
8.2.70.0070.00519.31
8.2.60.0080.00718.71
8.2.50.0100.00818.83
8.2.40.0130.00219.00
8.2.30.0090.00618.52
8.2.20.0120.00318.31
8.2.10.0090.00418.48
8.2.00.0100.00518.40
8.1.280.0040.01125.92
8.1.270.0110.00021.70
8.1.260.0030.00523.43
8.1.250.0050.00424.68
8.1.240.0050.00719.60
8.1.230.0100.00619.71
8.1.220.0120.00118.59
8.1.210.0080.00519.11
8.1.200.0060.00618.36
8.1.190.0110.00518.16
8.1.180.0080.00518.31
8.1.170.0060.00818.32
8.1.160.0090.00418.67
8.1.150.0090.00518.36
8.1.140.0100.00618.75
8.1.130.0090.00418.74
8.1.120.0080.00617.96
8.1.110.0070.00618.34
8.1.100.0080.00517.90
8.1.90.0070.00518.39
8.1.80.0100.00318.11
8.1.70.0100.00218.10
8.1.60.0090.00518.12
8.1.50.0100.00318.06
8.1.40.0080.00518.17
8.1.30.0080.00518.20
8.1.20.0110.00418.16
8.1.10.0110.00418.04
8.1.00.0130.00318.18
8.0.300.0050.00619.06
8.0.290.0080.00617.58
8.0.280.0100.00318.04
8.0.270.0080.00317.80
8.0.260.0090.00418.09
8.0.250.0100.00318.05
8.0.240.0110.00417.32
8.0.230.0080.00517.38
8.0.220.0060.00517.26
8.0.210.0080.00417.23
8.0.200.0060.00617.30
8.0.190.0060.00517.58
8.0.180.0080.00417.64
8.0.170.0100.00317.56
8.0.160.0080.00417.55
8.0.150.0090.00517.23
8.0.140.0100.00417.19
8.0.130.0090.00416.85
8.0.120.0090.00517.17
8.0.110.0070.00617.55
8.0.100.0100.00517.14
8.0.90.0090.00417.22
8.0.80.0100.00517.33
8.0.70.0080.00517.19
8.0.60.0110.00417.20
8.0.50.0090.00417.31
8.0.30.0070.00517.27
8.0.20.0100.00317.31
8.0.10.0100.00517.31
8.0.00.0070.00717.80
7.4.330.0080.00515.77
7.4.320.0090.00517.15
7.4.300.0080.00416.91
7.4.290.0090.00316.82
7.4.280.0080.00516.84
7.4.270.0100.00416.82
7.4.260.0100.00416.81
7.4.250.0090.00416.85
7.4.240.0100.00516.76
7.4.230.0100.00417.04
7.4.220.0100.00316.84
7.4.210.0090.00516.81
7.4.200.0110.00416.99
7.4.190.0100.00416.93
7.4.180.0100.00517.00
7.4.160.0100.00617.02
7.4.150.0090.00516.76
7.4.140.0100.00516.98
7.4.130.0100.00616.86
7.4.120.0080.00716.71
7.4.110.0110.00716.61
7.4.100.0140.00416.84
7.4.90.0130.00716.66
7.4.80.0140.00617.05
7.4.70.0110.00716.58
7.4.60.0110.00616.64
7.4.50.0130.00616.50
7.4.40.0120.00616.67
7.4.30.0100.00816.61
7.4.20.0130.00716.57
7.4.10.0120.00616.60
7.4.00.0110.00616.72
7.3.330.0110.00516.89
7.3.320.0140.00316.55
7.3.310.0130.00616.83
7.3.300.0130.00516.75
7.3.290.0130.00516.61
7.3.280.0150.00516.69
7.3.270.0130.00516.69
7.3.260.0140.00416.64
7.3.250.0160.00416.69
7.3.240.0140.00516.68
7.3.230.0130.00516.76
7.3.220.0140.00516.63
7.3.210.0140.00516.52
7.3.200.0130.00816.57
7.3.190.0130.00616.57
7.3.180.0120.00616.59
7.3.170.0130.00516.67
7.3.160.0130.00416.58
7.3.150.0110.00616.62
7.3.140.0120.00616.60
7.3.130.0140.00416.59
7.3.120.0110.00716.56
7.3.110.0120.00716.48
7.3.100.0120.00716.44
7.3.90.0110.00716.74
7.3.80.0140.00416.49
7.3.70.0130.00616.57
7.3.60.0140.00616.67
7.3.50.0140.00616.56
7.3.40.0130.00716.61
7.3.30.0120.00716.68
7.3.20.0150.00617.47
7.3.10.0110.00817.41
7.3.00.0110.00717.41
7.2.340.0110.00617.05
7.2.330.0120.00816.70
7.2.320.0120.00816.75
7.2.310.0120.00816.70
7.2.300.0140.00616.75
7.2.290.0120.00616.74
7.2.280.0130.00716.77
7.2.270.0140.00616.77
7.2.260.0100.00816.61
7.2.250.0120.00616.58
7.2.240.0140.00516.71
7.2.230.0110.00616.70
7.2.220.0130.00616.66
7.2.210.0110.00816.67
7.2.200.0140.00616.71
7.2.190.0130.00716.66
7.2.180.0140.00416.64
7.2.170.0130.00616.72
7.2.160.0130.00716.70
7.2.150.0170.00517.65
7.2.140.0140.00717.60
7.2.130.0140.00717.66
7.2.120.0120.00817.65
7.2.110.0120.00817.62
7.2.100.0130.00617.65
7.2.90.0130.00717.60
7.2.80.0140.00617.67
7.2.70.0140.00717.63
7.2.60.0150.00617.63
7.2.50.0130.00617.63
7.2.40.0120.00717.66
7.2.30.0150.00517.67
7.2.20.0130.00617.67
7.2.10.0120.00817.59
7.2.00.0130.00717.63

preferences:
52.83 ms | 400 KiB | 5 Q