3v4l.org

run code in 300+ PHP versions simultaneously
<?php class customException extends Exception { public function errorMessage() { $errorMsg = 'error on line ' .$this->getLine(). ' in '.$this->getFile().': <b>' .$this->geMessage().'</b> is not a valid e-mail address'; return $errorMsg; } } $emial = "someone@example.com"; try { if(filter_var($email, FILTER_VALIDATE_EMAIL) === false) { throw new customException($emial); } if(strpos($email,"example") !== FALSE) { throw new Exception("emial is an example e-mail"); } } catch (customException $e) { echo $e->errorMessage(); } catch(Excception $e) { echo $e->getMessage(); } ?>

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.0100.00717.13
8.3.50.0110.01118.55
8.3.40.0130.00319.45
8.3.30.0150.00019.23
8.3.20.0060.00322.51
8.3.10.0000.00823.91
8.3.00.0090.00019.88
8.2.180.0160.00318.91
8.2.170.0100.00622.96
8.2.160.0120.00320.72
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0090.00020.72
8.2.120.0030.00526.35
8.2.110.0040.00822.43
8.2.100.0130.00018.22
8.2.90.0080.00019.59
8.2.80.0030.00618.13
8.2.70.0030.00618.25
8.2.60.0090.00018.30
8.2.50.0040.00418.25
8.2.40.0080.00319.76
8.2.30.0040.00420.97
8.2.20.0030.00718.16
8.2.10.0000.00918.32
8.2.00.0060.00318.45
8.1.280.0030.01225.92
8.1.270.0130.00924.04
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00324.21
8.1.230.0140.00419.60
8.1.220.0000.00818.04
8.1.210.0030.00718.77
8.1.200.0030.00717.88
8.1.190.0030.00718.01
8.1.180.0040.00418.10
8.1.170.0040.00419.15
8.1.160.0000.00822.27
8.1.150.0080.00019.03
8.1.140.0000.00819.75
8.1.130.0000.00917.96
8.1.120.0040.00417.79
8.1.110.0080.00017.71
8.1.100.0090.00017.84
8.1.90.0000.00817.75
8.1.80.0040.00417.75
8.1.70.0000.00817.71
8.1.60.0000.00817.84
8.1.50.0030.00617.91
8.1.40.0060.00317.70
8.1.30.0000.00917.81
8.1.20.0030.00517.85
8.1.10.0000.00917.76
8.1.00.0030.00919.75
8.0.300.0000.00821.89
8.0.290.0060.00317.25
8.0.280.0040.00418.69
8.0.270.0050.00217.51
8.0.260.0000.00717.45
8.0.250.0030.00717.39
8.0.240.0040.00417.33
8.0.230.0040.00417.23
8.0.220.0000.00817.36
8.0.210.0000.00817.26
8.0.200.0050.00317.31
8.0.190.0030.00617.37
8.0.180.0050.00317.33
8.0.170.0000.00917.37
8.0.160.0030.00617.31
8.0.150.0000.00817.12
8.0.140.0040.00417.25
8.0.130.0070.00013.74
8.0.120.0030.00617.32
8.0.110.0030.00517.32
8.0.100.0030.00517.43
8.0.90.0040.00417.20
8.0.80.0100.01317.38
8.0.70.0000.00917.41
8.0.60.0040.00417.30
8.0.50.0040.00417.34
8.0.30.0110.01117.44
8.0.20.0130.01217.47
8.0.10.0060.00317.36
8.0.00.0060.01517.20
7.4.330.0000.00517.03
7.4.320.0000.00716.88
7.4.300.0000.00717.02
7.4.290.0050.00217.06
7.4.280.0030.00616.86
7.4.270.0050.00217.08
7.4.260.0040.00416.84
7.4.250.0000.01016.84
7.4.240.0020.00616.97
7.4.230.0030.00517.07
7.4.220.0090.01217.08
7.4.210.0030.01316.92
7.4.200.0080.00017.05
7.4.160.0060.01317.03
7.4.150.0110.00717.40
7.4.140.0070.01717.86
7.4.130.0090.01416.90
7.4.120.0110.00717.05
7.4.110.0040.01517.05
7.4.100.0130.00616.80
7.4.90.0170.00317.07
7.4.80.0100.01319.39
7.4.70.0030.01317.05
7.4.60.0110.00717.05
7.4.50.0050.00816.89
7.4.40.0140.00316.90
7.4.30.0120.00616.92
7.4.00.0040.00815.48
7.3.330.0040.00413.64
7.3.320.0060.00013.67
7.3.310.0030.00616.80
7.3.300.0000.00716.80
7.3.290.0000.00716.77
7.3.280.0070.00916.74
7.3.270.0090.01017.40
7.3.260.0070.01016.69
7.3.250.0140.00716.70
7.3.240.0110.00816.74
7.3.230.0140.00616.66
7.3.210.0110.00616.66
7.3.200.0130.01016.61
7.3.190.0090.01216.77
7.3.180.0080.00816.66
7.3.170.0060.02116.98
7.3.160.0110.00716.82
7.2.330.0030.01516.96
7.2.320.0090.00917.03
7.2.310.0120.01216.82
7.2.300.0110.01416.75
7.2.290.0090.00917.03
7.2.60.0060.01017.15
7.2.00.0060.00619.62
7.1.200.0340.00415.58
7.1.100.0060.00918.70
7.1.70.0070.00717.39
7.1.60.0090.01519.36
7.1.50.0060.01216.99
7.1.00.0000.07722.52
7.0.200.0000.00817.22
7.0.60.0100.07720.29
7.0.50.0030.04318.06
7.0.40.0000.05020.12
7.0.30.0500.07320.31
7.0.20.0200.04320.21
7.0.10.0200.04320.21
7.0.00.0100.05720.34
5.6.280.0030.05720.93
5.6.210.0070.08720.67
5.6.200.0030.05718.24
5.6.190.0030.08320.55
5.6.180.0400.04320.46
5.6.170.0200.04020.55
5.6.160.0070.06320.60
5.6.150.0070.04718.23
5.6.140.0000.04718.16
5.6.130.0030.04018.23
5.6.120.0030.04021.00
5.6.110.0170.07721.08
5.6.100.0030.04021.13
5.6.90.0100.08020.98
5.6.80.0100.03320.44
5.5.350.0200.08020.43
5.5.340.0000.08018.07
5.5.330.0070.04320.32
5.5.320.0330.05720.40
5.5.310.0130.05020.39
5.5.300.0070.06018.03
5.5.290.0070.07318.08
5.5.280.0100.08020.66
5.5.270.0200.05020.79
5.5.260.0070.08320.91
5.5.250.0070.04020.61
5.5.240.0230.07720.38

preferences:
54.39 ms | 400 KiB | 5 Q