3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* getMessage ( void ) final public ExceptionException::getPrevious ( void ) final public mixedException::getCode ( void ) final public stringException::getFile ( void ) final public arrayException::getTrace ( void ) final public stringException::getTraceAsString ( void ) public string Exception::__toString ( void ) final private voidException::__clone ( void ) */ error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { echo $e->getLine(); }

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.43
8.3.50.0080.00821.21
8.3.40.0090.00618.92
8.3.30.0110.00320.30
8.3.20.0070.00020.16
8.3.10.0040.00421.92
8.3.00.0040.00422.37
8.2.180.0080.00816.50
8.2.170.0040.01822.96
8.2.160.0070.01322.07
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.75
8.2.110.0110.00020.93
8.2.100.0060.00617.91
8.2.90.0080.00019.22
8.2.80.0040.00419.25
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00817.91
8.2.30.0000.00919.35
8.2.20.0070.00017.80
8.2.10.0040.00417.62
8.2.00.0040.00717.74
8.1.280.0160.00025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00320.87
8.1.230.0040.00819.17
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0040.00817.13
8.1.190.0040.00417.65
8.1.180.0080.00019.01
8.1.170.0000.00818.51
8.1.160.0030.00520.55
8.1.150.0020.00518.55
8.1.140.0040.00417.39
8.1.130.0070.00017.88
8.1.120.0040.00417.45
8.1.110.0050.00217.47
8.1.100.0080.00017.47
8.1.90.0000.00817.45
8.1.80.0000.00717.30
8.1.70.0000.00717.36
8.1.60.0040.00417.51
8.1.50.0050.00217.42
8.1.40.0040.00417.43
8.1.30.0050.00217.52
8.1.20.0030.00617.68
8.1.10.0000.00717.60
8.1.00.0040.00417.42
8.0.300.0080.00018.77
8.0.290.0080.00017.04
8.0.280.0000.00718.38
8.0.270.0000.00717.26
8.0.260.0040.00416.76
8.0.250.0080.00016.90
8.0.240.0030.00516.96
8.0.230.0030.00316.91
8.0.220.0030.00316.77
8.0.210.0000.00816.93
8.0.200.0040.00416.98
8.0.190.0050.00317.02
8.0.180.0050.00316.89
8.0.170.0040.00416.87
8.0.160.0000.00816.79
8.0.150.0000.00816.86
8.0.140.0000.00816.95
8.0.130.0000.00613.45
8.0.120.0070.00016.95
8.0.110.0000.00717.00
8.0.100.0000.00716.98
8.0.90.0040.00416.82
8.0.80.0060.01616.98
8.0.70.0030.00516.80
8.0.60.0000.00716.85
8.0.50.0000.00916.96
8.0.30.0090.01117.29
8.0.20.0110.00817.40
8.0.10.0070.00016.88
8.0.00.0080.01016.85
7.4.330.0050.00015.00
7.4.320.0060.00016.51
7.4.300.0070.00016.47
7.4.290.0000.00816.61
7.4.280.0000.00716.60
7.4.270.0070.00016.41
7.4.260.0050.00013.28
7.4.250.0000.00816.46
7.4.240.0050.00316.55
7.4.230.0000.00816.69
7.4.220.0140.00416.68
7.4.210.0060.00916.54
7.4.200.0000.00716.54
7.4.190.0070.00016.74
7.4.160.0080.00816.65
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0160.00516.43
7.4.120.0130.00516.50
7.4.110.0090.00916.33
7.4.100.0040.01516.69
7.4.90.0150.00316.62
7.4.80.0070.01019.39
7.4.70.0100.00716.54
7.4.60.0090.00916.53
7.4.50.0040.00416.04
7.4.40.0080.00522.77
7.4.30.0110.01116.64
7.4.00.0000.01415.16
7.3.330.0000.00513.30
7.3.320.0030.00213.36
7.3.310.0050.00316.46
7.3.300.0030.00316.38
7.3.290.0030.01016.38
7.3.280.0100.00716.36
7.3.270.0060.01017.40
7.3.260.0120.00416.41
7.3.250.0060.01116.55
7.3.240.0110.00616.41
7.3.230.0100.00616.45
7.3.210.0110.00616.34
7.3.200.0120.00919.39
7.3.190.0100.01016.38
7.3.180.0040.01116.38
7.3.170.0060.00916.50
7.3.160.0100.00616.64
7.3.120.0040.01115.10
7.2.330.0080.00816.42
7.2.320.0090.01516.62
7.2.310.0030.01316.68
7.2.300.0100.00716.64
7.2.290.0100.00616.43
7.1.200.0120.00015.85
7.1.70.0040.00417.34
7.1.60.0070.01719.32
7.1.50.0070.01716.80
7.1.00.0030.05722.33
7.0.200.0040.00416.88
7.0.140.0030.07322.21
7.0.100.0030.04320.06
7.0.90.0070.04019.93
7.0.80.0000.03719.94
7.0.70.0070.03720.13
7.0.60.0000.03719.93
7.0.50.0070.03320.29
7.0.40.0100.07720.19
7.0.30.0000.08320.04
7.0.20.0100.07719.99
7.0.10.0170.04020.08
7.0.00.0130.06020.14
5.6.280.0130.06321.09
5.6.250.0030.04320.57
5.6.240.0030.03320.58
5.6.230.0030.03720.60
5.6.220.0070.04020.47
5.6.210.0030.04020.65
5.6.200.0030.04721.01
5.6.190.0030.04721.14
5.6.180.0170.07021.03
5.6.170.0070.08721.14
5.6.160.0130.05721.06
5.6.150.0100.07721.08
5.6.140.0030.06721.07
5.6.130.0100.08021.04
5.6.120.0100.08721.00
5.6.110.0030.08321.09
5.6.100.0030.08321.01
5.6.90.0130.03321.15
5.6.80.0030.04320.43
5.6.70.0030.05320.35
5.6.60.0030.07720.50
5.6.50.0070.07720.43
5.6.40.0100.07720.31
5.6.30.0100.08020.31
5.6.20.0100.07020.49
5.6.10.0200.06320.52
5.6.00.0100.07320.38
5.5.380.0100.03020.38
5.5.370.0100.03320.36
5.5.360.0000.04020.35
5.5.350.0100.03320.39
5.5.340.0130.02720.80
5.5.330.0070.06320.74
5.5.320.0070.05720.83
5.5.310.0070.04320.88
5.5.300.0100.06020.64
5.5.290.0030.08320.86
5.5.280.0100.06020.80
5.5.270.0030.09020.91
5.5.260.0070.04720.87
5.5.250.0170.07720.73
5.5.240.0170.03020.03
5.5.230.0030.04720.29
5.5.220.0030.05720.17
5.5.210.0170.07020.18
5.5.200.0100.07720.16
5.5.190.0100.04020.25
5.5.180.0000.06320.23
5.5.160.0070.05020.18
5.5.150.0070.04720.27
5.5.140.0030.08020.16
5.5.130.0130.06320.17
5.5.120.0130.07020.07
5.5.110.0100.06320.07
5.5.100.0030.04720.15
5.5.90.0100.07020.16
5.5.80.0030.06320.06
5.5.70.0100.07719.95
5.5.60.0100.06320.03
5.5.50.0030.06020.11
5.5.40.0100.06020.10
5.5.30.0030.06320.05
5.5.20.0130.07720.05
5.5.10.0030.08719.96
5.5.00.0070.04020.10
5.4.450.0130.07319.23
5.4.440.0100.07319.48
5.4.430.0100.07319.45
5.4.420.0070.08319.20
5.4.410.0100.07319.42
5.4.400.0100.06719.23
5.4.390.0070.08019.22
5.4.380.0130.06019.13
5.4.370.0030.08019.13
5.4.360.0030.07319.03
5.4.350.0100.08019.05
5.4.340.0030.08319.12
5.4.320.0170.07018.92
5.4.310.0000.07319.02
5.4.300.0070.05719.09
5.4.290.0070.08718.89
5.4.280.0030.05019.23
5.4.270.0030.05318.85
5.4.260.0100.06019.13
5.4.250.0000.06319.02
5.4.240.0100.06019.20
5.4.230.0100.06719.19
5.4.220.0070.03719.09
5.4.210.0000.08019.21
5.4.200.0200.06719.04
5.4.190.0070.08019.03
5.4.180.0070.05319.08
5.4.170.0100.06718.93
5.4.160.0100.04319.11
5.4.150.0100.07319.19
5.4.140.0100.04316.45
5.4.130.0100.06716.13
5.4.120.0100.06716.40
5.4.110.0070.07316.33
5.4.100.0000.08016.50
5.4.90.0070.04316.35
5.4.80.0100.07016.34
5.4.70.0100.07016.41
5.4.60.0070.07016.33
5.4.50.0030.07016.41
5.4.40.0030.07316.46
5.4.30.0030.08016.31
5.4.20.0130.06716.45
5.4.10.0070.07316.46
5.4.00.0030.07715.88
5.3.290.0130.07314.71
5.3.280.0030.07314.62
5.3.270.0100.07314.55
5.3.260.0070.06714.72
5.3.250.0130.07014.70
5.3.240.0030.07714.63
5.3.230.0030.07014.71
5.3.220.0100.06714.49
5.3.210.0070.07714.70
5.3.200.0100.07014.66
5.3.190.0100.07314.63
5.3.180.0070.08014.51
5.3.170.0030.05014.62
5.3.160.0200.06314.55
5.3.150.0100.07714.55
5.3.140.0030.07314.48
5.3.130.0070.08014.52
5.3.120.0100.06714.67
5.3.110.0130.07014.45
5.3.100.0100.07014.13
5.3.90.0130.06714.08
5.3.80.0100.05714.05
5.3.70.0030.07714.12
5.3.60.0070.07314.13
5.3.50.0170.06314.01
5.3.40.0100.06713.95
5.3.30.0100.05313.88
5.3.20.0070.07013.80
5.3.10.0130.08013.75
5.3.00.0100.06713.64
5.2.170.0070.06011.04
5.2.160.0030.05711.14
5.2.150.0030.06011.20
5.2.140.0030.06311.16
5.2.130.0100.02711.09
5.2.120.0000.06711.00
5.2.110.0070.05311.13
5.2.100.0030.04311.11
5.2.90.0100.03311.21
5.2.80.0030.06710.98
5.2.70.0030.06011.16
5.2.60.0000.06011.11
5.2.50.0100.05711.10
5.2.40.0030.04710.93
5.2.30.0070.03711.04
5.2.20.0000.06010.91
5.2.10.0070.05010.87
5.2.00.0000.05310.77
5.1.60.0030.0409.98
5.1.50.0030.0309.98
5.1.40.0070.04710.09
5.1.30.0070.05310.35
5.1.20.0030.04710.42
5.1.10.0070.04010.05
5.1.00.0100.05010.12
5.0.50.0070.0438.82
5.0.40.0000.0238.82
5.0.30.0030.0578.82
5.0.20.0130.0378.82
5.0.10.0100.0408.82
5.0.00.0000.0478.82
4.4.90.0030.0378.82
4.4.80.0000.0208.82
4.4.70.0070.0338.82
4.4.60.0000.0378.82
4.4.50.0030.0338.82
4.4.40.0000.0338.82
4.4.30.0000.0378.82
4.4.20.0030.0378.82
4.4.10.0030.0338.82
4.4.00.0030.0378.82
4.3.110.0070.0338.82
4.3.100.0000.0338.82
4.3.90.0100.0278.82
4.3.80.0070.0438.82
4.3.70.0000.0378.82
4.3.60.0000.0378.82
4.3.50.0000.0338.82
4.3.40.0030.0338.82
4.3.30.0030.0308.82
4.3.20.0030.0338.82
4.3.10.0070.0338.82
4.3.00.0000.0378.82

preferences:
40.77 ms | 401 KiB | 5 Q