3v4l.org

run code in 300+ PHP versions simultaneously
<?php class customException extends Exception { public function errorMessage() { //error message $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile() .': <b>'.$this->getMessage().'</b> is not a valid E-Mail address'; return $errorMsg; } } $email = "someone@example...com"; try { //check if if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) { //throw exception if email is not valid throw new customException($email); } } catch (customException $e) { //display custom message echo $e->errorMessage(); } ?>

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.0090.00917.00
8.3.50.0110.00917.94
8.3.40.0160.00019.47
8.3.30.0110.00419.39
8.3.20.0130.00319.27
8.3.10.0060.00319.11
8.3.00.0130.00319.96
8.2.180.0110.01125.92
8.2.170.0070.01319.40
8.2.160.0030.01522.96
8.2.150.0000.00825.66
8.2.140.0080.00824.66
8.2.130.0080.00826.16
8.2.120.0000.01018.28
8.2.110.0060.00621.30
8.2.100.0090.00318.43
8.2.90.0060.00319.60
8.2.80.0080.00018.13
8.2.70.0030.00618.00
8.2.60.0030.00618.30
8.2.50.0040.00418.30
8.2.40.0000.00920.10
8.2.30.0030.01018.30
8.2.20.0040.00818.20
8.2.10.0090.00018.37
8.2.00.0000.01018.12
8.1.280.0100.00625.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00323.02
8.1.230.0040.00818.20
8.1.220.0080.00018.04
8.1.210.0030.00618.77
8.1.200.0060.00317.85
8.1.190.0040.00417.73
8.1.180.0090.00018.10
8.1.170.0080.00017.85
8.1.160.0060.00319.18
8.1.150.0000.00819.02
8.1.140.0090.00017.74
8.1.130.0040.00419.64
8.1.120.0040.00417.82
8.1.110.0050.00317.66
8.1.100.0080.00017.76
8.1.90.0040.00417.65
8.1.80.0060.00317.78
8.1.70.0040.00417.77
8.1.60.0030.00617.93
8.1.50.0060.00317.87
8.1.40.0040.00417.82
8.1.30.0030.00617.94
8.1.20.0100.00017.90
8.1.10.0050.00317.96
8.1.00.0040.00719.85
8.0.300.0000.00819.15
8.0.290.0040.00417.12
8.0.280.0030.00518.75
8.0.270.0040.00417.44
8.0.260.0000.00717.19
8.0.250.0000.00817.36
8.0.240.0020.00517.35
8.0.230.0030.00517.36
8.0.220.0060.00317.25
8.0.210.0040.00417.23
8.0.200.0030.00317.32
8.0.190.0000.00817.35
8.0.180.0000.00917.20
8.0.170.0030.00717.36
8.0.160.0040.00417.22
8.0.150.0030.00617.27
8.0.140.0060.00317.21
8.0.130.0070.00013.67
8.0.120.0030.00617.29
8.0.110.0040.00417.13
8.0.100.0060.00317.27
8.0.90.0050.00317.18
8.0.80.0120.00917.27
8.0.70.0030.00617.33
8.0.60.0040.00417.27
8.0.50.0050.00317.39
8.0.30.0110.01117.27
8.0.20.0110.00917.53
8.0.10.0040.00417.39
8.0.00.0050.01617.36
7.4.330.0050.00013.54
7.4.320.0080.00016.93
7.4.300.0030.00316.86
7.4.290.0070.00016.99
7.4.280.0000.00816.93
7.4.270.0040.00416.89
7.4.260.0000.00613.67
7.4.250.0050.00516.98
7.4.240.0070.00317.01
7.4.230.0040.00417.09
7.4.220.0110.01517.03
7.4.210.0120.00316.93
7.4.200.0040.00417.00
7.4.190.0040.00416.75
7.4.160.0060.01216.96
7.4.150.0150.00316.94
7.4.140.0060.01317.86
7.4.130.0200.00016.94
7.4.120.0070.01117.03
7.4.110.0040.01416.72
7.4.100.0120.00817.03
7.4.90.0170.00716.73
7.4.80.0060.01319.39
7.4.70.0140.00316.73
7.4.60.0110.00716.90
7.4.50.0000.00516.79
7.4.40.0000.01916.85
7.4.30.0040.01417.11
7.4.00.0040.01115.47
7.3.330.0000.00613.66
7.3.320.0030.00313.50
7.3.310.0040.00416.57
7.3.300.0030.00316.74
7.3.290.0080.00716.78
7.3.280.0130.01016.61
7.3.270.0160.00716.78
7.3.260.0110.00716.72
7.3.240.0110.00716.65
7.3.230.0050.01416.82
7.3.210.0120.00616.68
7.3.200.0070.01017.02
7.3.190.0110.00616.78
7.3.180.0120.00916.93
7.3.170.0100.00716.82
7.3.160.0090.00916.78
7.3.120.0040.01515.44
7.2.330.0070.01116.88
7.2.320.0090.00916.81
7.2.310.0140.01116.96
7.2.300.0120.00517.06
7.2.290.0190.00316.96
7.2.00.0000.01619.55
7.1.100.0110.00418.27
7.1.70.0000.01017.61
7.1.60.0130.01319.21
7.1.50.0070.01817.51
7.1.00.0000.03722.70
7.0.200.0000.01717.16
7.0.140.0070.06322.29
7.0.120.0030.06722.38
7.0.60.0100.03320.18
7.0.50.0070.03718.05
7.0.40.0100.06720.20
7.0.30.0630.06720.39
7.0.20.0330.05020.37
7.0.10.0270.07720.34
7.0.00.0030.04320.30
5.6.280.0030.06721.09
5.6.210.0070.08320.46
5.6.200.0100.08318.32
5.6.190.0070.04020.60
5.6.180.0370.07320.62
5.6.170.0300.05320.67
5.6.160.0070.08720.64
5.6.150.0100.08718.20
5.6.140.0030.05318.19
5.6.130.0030.05318.20
5.6.120.0000.04721.00
5.6.110.0100.08021.04
5.6.100.0030.04021.03
5.6.90.0100.06721.09
5.6.80.0170.06720.48
5.6.70.0300.07320.43
5.5.350.0200.07720.43
5.5.340.0130.07318.00
5.5.330.0030.04020.36
5.5.320.0070.04020.46
5.5.310.0270.04020.34
5.5.300.0100.05318.12
5.5.290.0030.06718.14
5.5.280.0030.05320.90
5.5.270.0100.08320.68
5.5.260.0170.06020.99
5.5.250.0070.08020.71
5.5.240.0100.03320.10
5.4.450.0030.06019.39
5.4.440.0030.05319.48
5.4.430.0130.07019.63
5.4.420.0070.04319.52
5.4.410.0130.07019.19
5.4.400.0030.08018.99
5.4.390.0100.04019.22
5.4.380.0030.08019.25
5.4.370.0130.06319.20
5.4.360.0100.04019.04
5.4.350.0070.03718.93
5.4.340.0070.03719.20
5.4.320.0000.04718.91
5.4.310.0030.08019.18
5.4.300.0100.06019.29
5.4.290.0070.03719.06
5.4.280.0100.06318.93
5.4.270.0130.07319.07
5.4.260.0130.06719.00
5.4.250.0030.04319.01
5.4.240.0070.03719.20
5.4.230.0070.08019.17
5.4.220.0200.06019.03
5.4.210.0070.08019.13
5.4.200.0130.03319.17
5.4.190.0100.07019.17
5.4.180.0100.06719.23
5.4.170.0170.06019.29
5.4.160.0070.04719.19
5.4.150.0130.07319.12
5.4.140.0070.07016.36
5.4.130.0000.07716.40
5.4.120.0030.03716.51
5.4.110.0130.06316.31
5.4.100.0000.04716.41
5.4.90.0100.03716.46
5.4.80.0100.06716.38
5.4.70.0070.06016.29
5.4.60.0000.06316.36
5.4.50.0030.03316.51
5.4.40.0000.04716.52
5.4.30.0070.05316.43
5.4.20.0100.06016.37
5.4.10.0070.04716.45
5.4.00.0070.04015.80
5.3.290.0100.06714.64
5.3.280.0070.04014.71
5.3.270.0200.06714.66
5.3.260.0070.03714.82
5.3.250.0030.04014.71
5.3.240.0030.07014.55
5.3.230.0070.06714.66
5.3.220.0030.06014.69
5.3.210.0000.05314.81
5.3.200.0000.07014.70
5.3.190.0030.07714.67
5.3.180.0030.05014.64
5.3.170.0070.07314.69
5.3.160.0070.04314.65
5.3.150.0030.05014.64
5.3.140.0030.05314.68
5.3.130.0170.06714.66
5.3.120.0130.07314.62
5.3.110.0070.07014.66
5.3.100.0070.07314.14
5.3.90.0070.06714.11
5.3.80.0030.08014.07
5.3.70.0000.05014.05
5.3.60.0030.05314.21
5.3.50.0030.06714.16
5.3.40.0070.07314.07
5.3.30.0100.07313.97
5.3.20.0030.06713.69
5.3.10.0030.07013.69
5.3.00.0100.04713.53
5.2.170.0130.04011.26
5.2.160.0070.04711.27
5.2.150.0070.04011.09
5.2.140.0070.06311.16
5.2.130.0130.04311.03
5.2.120.0030.04311.12
5.2.110.0130.05711.08
5.2.100.0070.05311.26
5.2.90.0030.06011.07
5.2.80.0070.04011.10
5.2.70.0030.06711.09
5.2.60.0030.03711.21
5.2.50.0030.05711.07
5.2.40.0070.04310.92
5.2.30.0030.03711.03
5.2.20.0000.03311.02
5.2.10.0000.06010.89
5.2.00.0100.06710.61
5.1.60.0070.0539.95
5.1.50.0100.0509.97
5.1.40.0030.02710.05
5.1.30.0030.05710.30
5.1.20.0070.03010.43
5.1.10.0070.05310.13
5.1.00.0030.0579.98
5.0.50.0100.0208.50
5.0.40.0030.0478.38
5.0.30.0030.0438.20
5.0.20.0000.0478.25
5.0.10.0000.0378.22
5.0.00.0070.0478.16
4.4.90.0000.0308.02
4.4.80.0070.0338.02
4.4.70.0030.0338.02
4.4.60.0030.0378.02
4.4.50.0030.0278.02
4.4.40.0030.0538.02
4.4.30.0000.0238.02
4.4.20.0030.0378.02
4.4.10.0000.0308.02
4.4.00.0070.0508.02
4.3.110.0030.0308.02
4.3.100.0000.0308.02
4.3.90.0070.0208.02
4.3.80.0030.0278.02
4.3.70.0000.0378.02
4.3.60.0000.0378.02
4.3.50.0000.0378.02
4.3.40.0030.0338.02
4.3.30.0070.0308.02
4.3.20.0030.0278.02
4.3.10.0030.0338.02
4.3.00.0030.0308.02

preferences:
41.78 ms | 401 KiB | 5 Q