3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CErrorException extends Exception {} function handleError($level, $message, $file, $line){ var_dump(error_reporting()); if( error_reporting() != 0){ throw new CErrorException($message, $level); } } function handleException(Exception $exception){ var_dump('Exception handled at global level'); } set_error_handler('handleError'); set_exception_handler('handleException'); try { require_once('non\existent\file'); //Will generate an error and cause an exception to be thrown. } catch (Exception $e) { var_dump("let's deal with the exception"); }

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.0120.00316.63
8.3.50.0110.00621.89
8.3.40.0120.00318.98
8.3.30.0090.00619.18
8.3.20.0080.00020.20
8.3.10.0000.00823.36
8.3.00.0040.00419.38
8.2.180.0160.00718.54
8.2.170.0030.01022.96
8.2.160.0100.01020.58
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00022.25
8.2.110.0090.00021.02
8.2.100.0040.00718.09
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0090.00017.63
8.2.60.0040.00417.93
8.2.50.0040.00418.22
8.2.40.0040.00420.35
8.2.30.0000.00719.25
8.2.20.0040.00417.82
8.2.10.0070.00018.07
8.2.00.0040.00417.77
8.1.280.0140.00725.92
8.1.270.0140.00323.91
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0050.00522.61
8.1.230.0110.00020.34
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0040.00418.86
8.1.150.0030.00520.15
8.1.140.0040.00417.46
8.1.130.0000.00717.93
8.1.120.0060.00317.48
8.1.110.0030.00517.48
8.1.100.0000.00817.48
8.1.90.0000.00717.38
8.1.80.0030.00317.50
8.1.70.0070.00017.44
8.1.60.0040.00417.63
8.1.50.0030.00617.62
8.1.40.0000.00817.48
8.1.30.0060.00317.54
8.1.20.0000.00817.76
8.1.10.0000.00817.67
8.1.00.0040.00417.44
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0070.00018.52
8.0.270.0030.00317.32
8.0.260.0000.00716.92
8.0.250.0030.00317.13
8.0.240.0040.00417.14
8.0.230.0000.00717.09
8.0.220.0030.00516.98
8.0.210.0070.00016.96
8.0.200.0040.00416.98
8.0.190.0080.00017.02
8.0.180.0070.00017.04
8.0.170.0030.00616.98
8.0.160.0000.00716.91
8.0.150.0000.00716.88
8.0.140.0000.00716.92
8.0.130.0060.00013.44
8.0.120.0040.00417.01
8.0.110.0000.00816.91
8.0.100.0040.00416.85
8.0.90.0000.00817.10
8.0.80.0040.01516.99
8.0.70.0000.00817.06
8.0.60.0030.00516.92
8.0.50.0040.00416.91
8.0.30.0120.01017.11
8.0.20.0100.01117.40
8.0.10.0000.00817.15
8.0.00.0160.01516.82
7.4.330.0020.00215.16
7.4.320.0000.00616.63
7.4.300.0060.00016.62
7.4.290.0000.00716.55
7.4.280.0030.00316.52
7.4.270.0000.00716.57
7.4.260.0000.00716.50
7.4.250.0040.00416.50
7.4.240.0000.00716.60
7.4.230.0000.00716.57
7.4.220.0120.00616.55
7.4.210.0050.01216.57
7.4.200.0000.00716.71
7.4.190.0050.00316.63
7.4.160.0160.00616.61
7.4.150.0120.00617.40
7.4.140.0070.01317.86
7.4.130.0130.00516.57
7.4.120.0070.01216.62
7.4.110.0100.00716.53
7.4.100.0170.00316.62
7.4.90.0000.01716.67
7.4.80.0070.01019.39
7.4.70.0070.01016.73
7.4.60.0160.00316.61
7.4.50.0100.00016.56
7.4.40.0070.01122.77
7.4.30.0080.00816.38
7.4.00.0040.01214.93
7.3.330.0000.00513.22
7.3.320.0000.00513.40
7.3.310.0000.00716.40
7.3.300.0000.00716.39
7.3.290.0140.00716.38
7.3.280.0110.00616.39
7.3.270.0110.00617.40
7.3.260.0200.02316.68
7.3.250.0170.00316.46
7.3.240.0060.01116.54
7.3.230.0170.00016.39
7.3.210.0130.00416.56
7.3.200.0030.01419.39
7.3.190.0110.01116.54
7.3.180.0030.01516.39
7.3.170.0140.00516.54
7.3.160.0030.01316.41
7.3.120.0030.01414.73
7.3.110.0110.00714.74
7.3.100.0030.01314.89
7.3.90.0000.01814.92
7.3.80.0070.00715.01
7.3.70.0060.00614.57
7.3.60.0040.01214.80
7.3.50.0060.00914.84
7.3.40.0100.00314.89
7.3.30.0070.00714.71
7.3.20.0100.00316.67
7.3.10.0030.01016.59
7.3.00.0070.00316.69
7.2.330.0080.00816.65
7.2.320.0030.01616.74
7.2.310.0060.01216.65
7.2.300.0090.00816.66
7.2.290.0120.01216.66
7.2.250.0130.00615.15
7.2.240.0100.01015.32
7.2.230.0040.01414.92
7.2.220.0030.00715.27
7.2.210.0070.00715.32
7.2.200.0030.00715.12
7.2.190.0070.00715.15
7.2.180.0130.00314.86
7.2.170.0040.01115.14
7.2.60.0110.00417.08
7.1.330.0030.01315.97
7.1.320.0060.00615.56
7.1.310.0100.00715.98
7.1.300.0000.01115.62
7.1.290.0090.00315.77
7.1.280.0090.00615.77
7.1.270.0030.00915.68
7.1.260.0070.00315.72
7.1.200.0070.00315.79
7.1.70.0030.00916.67
7.1.60.0100.01419.33
7.1.50.0100.01016.93
7.1.00.0030.07322.43
7.0.200.0000.00716.95
7.0.140.0030.07022.18
7.0.60.0100.08719.91
7.0.50.0030.07017.89
7.0.40.0030.04720.24
7.0.30.0200.05720.34
7.0.20.0300.03320.31
7.0.10.0030.09320.11
7.0.00.0070.04720.33
5.6.280.0030.07321.11
5.6.210.0030.07320.61
5.6.200.0100.04318.16
5.6.190.0070.05020.53
5.6.180.0130.04320.63
5.6.170.0300.07720.41
5.6.160.0170.07020.58
5.6.150.0030.08718.24
5.6.140.0100.04318.17
5.6.130.0030.08318.27
5.6.120.0200.03020.98
5.6.110.0070.08321.14
5.6.100.0130.04320.97
5.6.90.0200.06020.96
5.6.80.0100.07720.40
5.5.350.0270.07020.45
5.5.340.0070.04718.02
5.5.330.0030.04020.32
5.5.320.0270.08020.27
5.5.310.0330.07720.34
5.5.300.0100.07717.95
5.5.290.0070.07018.15
5.5.280.0030.05720.90
5.5.270.0070.05720.78
5.5.260.0070.06720.98
5.5.250.0030.05020.59
5.5.240.0000.06720.24
5.4.450.0100.04719.43
5.4.440.0230.07019.64
5.4.430.0170.05019.55
5.4.420.0270.07019.39
5.4.410.0270.06019.42
5.4.400.0100.05319.14
5.4.390.0330.06319.23
5.4.380.0170.05019.16
5.4.370.0230.07019.09
5.4.360.0200.08019.00
5.4.350.0170.07319.17
5.4.340.0170.05719.16
5.4.320.0230.04719.23
5.4.310.0300.03018.95
5.4.300.0370.04719.27
5.4.290.0300.06719.04
5.4.280.0230.07719.20
5.4.270.0200.06019.23
5.4.260.0200.05719.12
5.4.250.0170.05718.94
5.4.240.0330.06719.09
5.4.230.0300.04319.13
5.4.220.0200.07019.22
5.4.210.0230.03718.99
5.4.200.0170.03719.09
5.4.190.0230.03719.14
5.4.180.0200.03319.06
5.4.170.0230.07318.87
5.4.160.0270.05319.00
5.4.150.0130.04719.20
5.4.140.0200.06316.55
5.4.130.0170.07716.46
5.4.120.0370.03316.43
5.4.110.0270.07016.51
5.4.100.0230.07016.61
5.4.90.0230.07016.61
5.4.80.0270.06316.44
5.4.70.0170.04016.58
5.4.60.0230.02716.33
5.4.50.0230.07316.17
5.4.40.0270.06316.54
5.4.30.0270.07016.43
5.4.20.0270.06316.52
5.4.10.0200.07316.53
5.4.00.0270.06015.76
5.3.290.0170.07014.60
5.3.280.0200.04314.53
5.3.270.0170.04314.70
5.3.260.0170.07314.60
5.3.250.0270.07014.63
5.3.240.0200.03714.62
5.3.230.0200.07314.73
5.3.220.0200.07714.75
5.3.210.0200.06714.56
5.3.200.0170.06714.48
5.3.190.0170.05714.60
5.3.180.0230.07314.67
5.3.170.0230.04014.64
5.3.160.0170.03714.49
5.3.150.0170.04014.55
5.3.140.0170.08014.48
5.3.130.0200.06714.59
5.3.120.0230.06714.48
5.3.110.0230.04714.48
5.3.100.0270.03014.07
5.3.90.0130.04013.94
5.3.80.0200.03313.96
5.3.70.0130.04713.94
5.3.60.0070.04714.02
5.3.50.0230.04313.87
5.3.40.0270.05013.89
5.3.30.0100.05313.90
5.3.20.0230.06013.73
5.3.10.0330.04013.75
5.3.00.0230.05313.88
5.2.170.0270.05012.11
5.2.160.0300.02312.11
5.2.150.0100.06312.11
5.2.140.0200.05012.11
5.2.130.0130.06712.11
5.2.120.0200.04312.11
5.2.110.0200.06312.11
5.2.100.0170.03712.11
5.2.90.0230.06012.11
5.2.80.0170.05712.11
5.2.70.0170.03012.11
5.2.60.0270.04312.11
5.2.50.0230.05712.11
5.2.40.0170.06012.11
5.2.30.0170.05312.11
5.2.20.0130.04012.11
5.2.10.0170.04712.11
5.2.00.0170.06012.11
5.1.60.0230.03312.11
5.1.50.0230.03712.11
5.1.40.0130.04012.11
5.1.30.0200.03312.11
5.1.20.0100.03712.11
5.1.10.0070.05012.11
5.1.00.0130.04712.11
5.0.50.0100.02712.11
5.0.40.0100.04312.11
5.0.30.0070.06312.11
5.0.20.0100.03312.11
5.0.10.0030.03012.11
5.0.00.0070.03712.11
4.4.90.0030.03712.11
4.4.80.0100.03312.11
4.4.70.0100.03312.11
4.4.60.0130.02712.11
4.4.50.0170.01312.11
4.4.40.0100.04312.11
4.4.30.0070.02712.11
4.4.20.0070.02012.11
4.4.10.0100.01312.11
4.4.00.0070.05312.11
4.3.110.0070.02712.11
4.3.100.0130.03712.11
4.3.90.0170.02712.11
4.3.80.0200.02712.11
4.3.70.0130.03012.11
4.3.60.0130.02312.11
4.3.50.0070.02712.11
4.3.40.0070.03312.11
4.3.30.0030.02712.11
4.3.20.0030.03012.11
4.3.10.0070.02712.11
4.3.00.0100.02712.11

preferences:
47.82 ms | 401 KiB | 5 Q