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->getFle().': <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.70.0100.00719.15
8.3.60.0110.00817.25
8.3.50.0080.01122.30
8.3.40.0080.01219.34
8.3.30.0130.00319.21
8.3.20.0040.00420.58
8.3.10.0040.00424.03
8.3.00.0060.00319.88
8.2.190.0060.01017.50
8.2.180.0070.01018.91
8.2.170.0060.01022.96
8.2.160.0040.01420.72
8.2.150.0030.00624.18
8.2.140.0060.00324.66
8.2.130.0040.00420.75
8.2.120.0000.00826.35
8.2.110.0040.00822.45
8.2.100.0120.00018.41
8.2.90.0030.00619.59
8.2.80.0090.00018.13
8.2.70.0080.00018.25
8.2.60.0050.00518.30
8.2.50.0060.00318.07
8.2.40.0000.01219.75
8.2.30.0030.00520.93
8.2.20.0030.00718.25
8.2.10.0000.01018.48
8.2.00.0000.00818.43
8.1.280.0120.00325.92
8.1.270.0050.00324.29
8.1.260.0000.00828.09
8.1.250.0060.00328.09
8.1.240.0060.00319.67
8.1.230.0040.00919.39
8.1.220.0060.00318.15
8.1.210.0000.00918.77
8.1.200.0030.00617.75
8.1.190.0030.00618.01
8.1.180.0030.00718.10
8.1.170.0000.00919.03
8.1.160.0030.00622.13
8.1.150.0030.00519.15
8.1.140.0000.00919.77
8.1.130.0000.00717.71
8.1.120.0080.00017.71
8.1.110.0080.00017.68
8.1.100.0090.00317.68
8.1.90.0050.00317.79
8.1.80.0030.00517.65
8.1.70.0040.00417.80
8.1.60.0030.00517.93
8.1.50.0090.00017.74
8.1.40.0080.00017.77
8.1.30.0030.00617.84
8.1.20.0060.00317.86
8.1.10.0080.00017.83
8.1.00.0070.00419.91
8.0.300.0040.00418.77
8.0.290.0080.00017.25
8.0.280.0000.00718.63
8.0.270.0030.00517.46
8.0.260.0000.00717.23
8.0.250.0030.00617.31
8.0.240.0000.00717.35
8.0.230.0050.00317.36
8.0.220.0020.00517.32
8.0.210.0060.00317.23
8.0.200.0000.00717.40
8.0.190.0060.00317.32
8.0.180.0050.00317.30
8.0.170.0040.00417.37
8.0.160.0030.00617.33
8.0.150.0000.00817.13
8.0.140.0000.00817.15
8.0.130.0030.00313.68
8.0.120.0090.00017.36
8.0.110.0030.00517.39
8.0.100.0060.00317.37
8.0.90.0000.00817.23
8.0.80.0160.00617.33
8.0.70.0060.00317.28
8.0.60.0000.00817.22
8.0.50.0000.00817.28
8.0.30.0100.00817.34
8.0.20.0090.01317.53
8.0.10.0090.00017.53
8.0.00.0080.01017.20
7.4.330.0000.00517.00
7.4.320.0040.00417.01
7.4.300.0000.00716.88
7.4.290.0040.00417.04
7.4.280.0030.00717.02
7.4.270.0000.00716.97
7.4.260.0030.00516.96
7.4.250.0080.00016.87
7.4.240.0060.00216.99
7.4.230.0040.00416.77
7.4.220.0000.00716.75
7.4.210.0040.01217.01
7.4.200.0000.00717.01
7.4.160.0160.00916.84
7.4.150.0100.01017.40
7.4.140.0060.01417.86
7.4.130.0080.01216.98
7.4.120.0100.01216.88
7.4.110.0190.00016.91
7.4.100.0000.01917.00
7.4.90.0130.00516.94
7.4.80.0040.01419.39
7.4.70.0000.01716.73
7.4.60.0090.00917.13
7.4.50.0130.00617.03
7.4.40.0090.00916.96
7.4.30.0130.00616.75
7.4.00.0080.00415.55
7.3.330.0040.00413.64
7.3.320.0030.00313.68
7.3.310.0040.00416.86
7.3.300.0080.00016.60
7.3.290.0000.00816.74
7.3.280.0110.00916.71
7.3.270.0070.01017.40
7.3.260.0110.00716.71
7.3.250.0100.01116.80
7.3.240.0120.01016.69
7.3.230.0110.00716.89
7.3.210.0070.01016.67
7.3.200.0130.00316.67
7.3.190.0070.01116.84
7.3.180.0090.01216.99
7.3.170.0130.01116.85
7.3.160.0130.00616.83
7.3.10.0080.01116.86
7.3.00.0110.00416.80
7.2.330.0100.01016.77
7.2.320.0040.01516.94
7.2.310.0110.00716.95
7.2.300.0120.01216.71
7.2.290.0120.00617.02
7.2.130.0080.01016.81
7.2.120.0170.00317.01
7.2.110.0090.00917.03
7.2.100.0090.00617.00
7.2.90.0110.00816.98
7.2.80.0080.00917.19
7.2.70.0150.00616.71
7.2.60.0400.01016.29
7.2.50.0100.00517.05
7.2.40.0070.01116.89
7.2.30.0110.00917.09
7.2.20.0150.00516.98
7.2.10.0100.00916.65
7.2.00.0060.01018.00
7.1.250.0070.01015.69
7.1.200.0090.00616.15
7.1.100.0000.01118.48
7.1.70.0000.00817.59
7.1.60.0070.01719.36
7.1.50.0100.01317.09
7.1.00.0070.07722.56
7.0.200.0000.00916.96
7.0.60.0030.09020.09
7.0.50.0000.08718.05
7.0.40.0130.04320.41
7.0.30.0530.04320.60
7.0.20.0230.03320.23
7.0.10.0170.07020.45
7.0.00.0100.08020.27
5.6.280.0030.04721.09
5.6.210.0070.06320.51
5.6.200.0100.08318.32
5.6.190.0000.05720.55
5.6.180.0470.08020.66
5.6.170.0170.04320.60
5.6.160.0070.06320.54
5.6.150.0100.04018.39
5.6.140.0030.08718.20
5.6.130.0000.04318.21
5.6.120.0100.03321.02
5.6.110.0000.05320.99
5.6.100.0030.04321.13
5.6.90.0100.08021.01
5.6.80.0070.03720.45
5.5.350.0230.07720.49
5.5.340.0070.05718.13
5.5.330.0070.08320.51
5.5.320.0470.07320.31
5.5.310.0270.04020.35
5.5.300.0070.08717.98
5.5.290.0130.07718.02
5.5.280.0030.05720.80
5.5.270.0070.08320.80
5.5.260.0070.07720.81
5.5.250.0000.07720.69
5.5.240.0170.07720.39

preferences:
52.31 ms | 401 KiB | 5 Q