3v4l.org

run code in 300+ PHP versions simultaneously
<?php class customException extends Exception { public function errorMessage() { //error message $errorMsg = $this->getMessage().' is not a valid E-Mail address.'; return $errorMsg; } } $email = "someone@.com"; try { try { //check for "example" in mail address if(strpos($email, "example") !== FALSE) { //throw exception if email is not valid throw new Exception($email); } } catch(Exception $e) { //re-throw exception 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.0070.01018.30
8.3.50.0290.00622.06
8.3.40.0070.00718.77
8.3.30.0100.00718.96
8.3.20.0040.00420.09
8.3.10.0040.00420.36
8.3.00.0080.00019.56
8.2.180.0090.01318.16
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00022.24
8.2.110.0090.00022.16
8.2.100.0050.00517.78
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0040.00417.59
8.2.60.0000.00817.92
8.2.50.0050.00318.07
8.2.40.0040.00418.21
8.2.30.0020.00519.12
8.2.20.0050.00217.49
8.2.10.0030.00518.01
8.2.00.0000.00817.61
8.1.280.0120.00625.92
8.1.270.0050.00523.83
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00623.98
8.1.230.0090.00319.02
8.1.220.0040.00417.74
8.1.210.0000.00718.77
8.1.200.0030.01116.75
8.1.190.0030.00516.88
8.1.180.0050.00318.10
8.1.170.0100.00018.37
8.1.160.0000.00721.94
8.1.150.0040.00418.84
8.1.140.0050.00217.44
8.1.130.0030.00317.82
8.1.120.0000.00717.37
8.1.110.0000.00817.44
8.1.100.0070.00017.31
8.1.90.0050.00317.38
8.1.80.0040.00417.46
8.1.70.0000.00817.39
8.1.60.0060.00317.48
8.1.50.0030.00517.44
8.1.40.0040.00417.33
8.1.30.0000.00817.56
8.1.20.0000.00717.63
8.1.10.0020.00517.30
8.1.00.0030.00617.37
8.0.300.0060.00318.77
8.0.290.0070.00016.75
8.0.280.0070.00018.29
8.0.270.0050.00317.07
8.0.260.0060.00017.04
8.0.250.0030.00316.89
8.0.240.0040.00416.77
8.0.230.0000.00716.80
8.0.220.0070.00016.85
8.0.210.0030.00316.79
8.0.200.0030.00316.92
8.0.190.0030.00316.92
8.0.180.0000.00716.87
8.0.170.0040.00416.76
8.0.160.0040.00416.87
8.0.150.0080.00016.73
8.0.140.0040.00416.75
8.0.130.0000.00513.29
8.0.120.0040.00416.79
8.0.110.0040.00416.84
8.0.100.0000.00716.69
8.0.90.0070.00016.86
8.0.80.0100.00716.76
8.0.70.0040.00416.84
8.0.60.0080.00016.86
8.0.50.0070.00016.67
8.0.30.0110.01316.88
8.0.20.0120.00817.40
8.0.10.0000.00716.99
8.0.00.0140.00516.60
7.4.330.0000.00515.09
7.4.320.0060.00016.62
7.4.300.0030.00316.44
7.4.290.0000.00616.63
7.4.280.0040.00416.59
7.4.270.0000.00716.50
7.4.260.0030.00316.38
7.4.250.0020.00516.52
7.4.240.0040.00316.46
7.4.230.0030.00316.43
7.4.220.0170.01016.44
7.4.210.0130.00716.53
7.4.200.0000.00816.69
7.4.160.0100.00716.32
7.4.150.0080.00817.40
7.4.140.0120.00717.86
7.4.130.0050.01416.41
7.4.120.0150.00316.41
7.4.110.0100.00616.50
7.4.100.0090.00616.38
7.4.90.0100.00716.56
7.4.80.0090.00916.31
7.4.70.0000.01616.40
7.4.60.0080.00816.48
7.4.50.0050.00316.50
7.4.40.0130.00316.40
7.4.30.0060.00916.41
7.4.00.0080.00814.94
7.3.330.0040.00413.16
7.3.320.0030.00313.08
7.3.310.0030.00316.23
7.3.300.0030.00316.28
7.3.290.0100.01016.29
7.3.280.0070.00916.22
7.3.270.0070.01117.40
7.3.260.0160.00916.60
7.3.250.0130.00716.21
7.3.240.0060.01216.36
7.3.230.0120.00416.39
7.3.210.0140.00316.20
7.3.200.0060.01219.39
7.3.190.0120.00616.35
7.3.180.0070.00916.49
7.3.170.0120.00616.35
7.3.160.0100.00716.28
7.3.120.0030.01614.68
7.3.110.0090.00614.70
7.3.100.0060.01214.73
7.3.90.0140.00414.77
7.3.80.0040.01114.80
7.3.70.0070.00714.84
7.3.60.0090.00414.87
7.3.50.0030.00614.64
7.3.40.0000.01714.52
7.3.30.0030.00714.49
7.3.20.0030.01016.71
7.3.10.0050.00816.35
7.3.00.0060.00716.46
7.2.330.0060.01216.69
7.2.320.0070.02116.53
7.2.310.0070.01116.52
7.2.300.0060.01216.39
7.2.290.0070.01016.34
7.2.250.0090.00914.84
7.2.240.0100.01014.49
7.2.230.0030.01214.88
7.2.220.0030.00714.89
7.2.210.0030.01314.62
7.2.200.0110.00615.09
7.2.190.0040.00814.86
7.2.180.0040.00715.08
7.2.170.0040.00815.02
7.2.130.0090.00416.43
7.2.120.0100.00316.45
7.2.110.0040.00916.50
7.2.100.0030.00816.72
7.2.90.0050.00616.79
7.2.80.0070.01016.56
7.2.70.0140.00616.39
7.2.60.0020.01016.66
7.2.50.0030.01016.37
7.2.40.0050.00716.70
7.2.30.0020.01216.91
7.2.20.0050.00816.65
7.2.10.0060.00516.61
7.2.00.0100.00617.45
7.1.330.0000.01815.61
7.1.320.0040.01115.70
7.1.310.0000.01315.80
7.1.300.0090.00615.50
7.1.290.0090.00615.83
7.1.280.0040.01115.65
7.1.270.0060.00615.48
7.1.260.0070.00315.84
7.1.250.0030.00815.37
7.1.200.0080.00415.59
7.1.100.0080.00318.11
7.1.70.0000.00717.04
7.1.60.0070.01019.32
7.1.50.0140.01116.95
7.1.00.0070.07022.30
7.0.200.0040.00416.49
7.0.140.0000.07322.12
7.0.60.0100.08019.92
7.0.50.0030.04317.87
7.0.40.0030.08020.11
7.0.30.0230.06020.30
7.0.20.0270.05720.23
7.0.10.0100.08320.24
7.0.00.0070.07020.23
5.6.280.0070.07020.87
5.6.210.0030.06720.75
5.6.200.0000.09318.18
5.6.190.0000.04720.52
5.6.180.0630.06320.55
5.6.170.0100.04720.44
5.6.160.0030.08720.56
5.6.150.0130.08018.19
5.6.140.0100.03318.14
5.6.130.0030.04018.27
5.6.120.0000.04320.74
5.6.110.0230.06721.12
5.6.100.0070.04020.98
5.6.90.0030.10021.01
5.6.80.0230.07020.44
5.5.350.0230.06720.43
5.5.340.0030.08317.93
5.5.330.0000.05020.21
5.5.320.0330.08020.19
5.5.310.0270.06720.30
5.5.300.0130.07318.07
5.5.290.0130.07017.91
5.5.280.0070.06320.64
5.5.270.0100.07320.73
5.5.260.0070.06720.86
5.5.250.0130.04320.79
5.5.240.0100.07320.07
5.4.450.0200.06319.48
5.4.440.0830.05319.48
5.4.430.0600.06019.45
5.4.420.0870.05719.48
5.4.410.0900.05319.48
5.4.400.1000.05719.16
5.4.390.0700.05718.98
5.4.380.0500.07018.63
5.4.370.0330.05718.56
5.4.360.0370.04318.69
5.4.350.0400.04318.78
5.4.340.0370.04718.79
5.4.320.0060.03612.50
5.4.310.0050.04212.50
5.4.300.0060.03612.50
5.4.290.0060.03712.50
5.4.280.0040.03612.40
5.4.270.0050.04012.39
5.4.260.0090.04012.40
5.4.250.0070.04612.40
5.4.240.0050.03512.40
5.4.230.0100.03212.39
5.4.220.0070.04112.39
5.4.210.0060.03312.39
5.4.200.0070.03412.39
5.4.190.0040.03712.38
5.4.180.0040.03612.38
5.4.170.0080.04312.40
5.4.160.0110.04312.39
5.4.150.0070.03612.39
5.4.140.0060.03512.07
5.4.130.0050.04012.06
5.4.120.0030.03712.02
5.4.110.0080.03912.02
5.4.100.0060.03512.02
5.4.90.0030.03812.02
5.4.80.0080.03612.01
5.4.70.0060.03412.01
5.4.60.0060.03312.02
5.4.50.0040.03512.02
5.4.40.0060.03312.00
5.4.30.0070.03412.00
5.4.20.0050.04012.00
5.4.10.0060.03312.00
5.4.00.0060.03611.48
5.3.290.0070.03612.80
5.3.280.0060.03612.71
5.3.270.0080.04112.72
5.3.260.0080.03712.72
5.3.250.0070.03812.72
5.3.240.0060.04112.72
5.3.230.0070.03712.71
5.3.220.0110.03912.68
5.3.210.0080.04112.68
5.3.200.0120.03312.68
5.3.190.0060.03712.68
5.3.180.0040.03712.67
5.3.170.0070.03512.67
5.3.160.0050.03712.67
5.3.150.0050.03612.68
5.3.140.0070.04112.66
5.3.130.0050.03912.66
5.3.120.0070.03612.66
5.3.110.0070.03812.66
5.3.100.0060.03612.11
5.3.90.0070.04212.10
5.3.80.0090.03812.09
5.3.70.0100.03612.09
5.3.60.0050.03612.08
5.3.50.0060.03612.03
5.3.40.0070.03512.02
5.3.30.0090.03511.98
5.3.20.0090.03111.77
5.3.10.0060.03211.73
5.3.00.0070.03811.71
5.2.170.0070.0399.22
5.2.160.0060.0309.22
5.2.150.0070.0359.22
5.2.140.0030.0339.22
5.2.130.0030.0309.18
5.2.120.0080.0379.17
5.2.110.0040.0369.19
5.2.100.0070.0289.18
5.2.90.0060.0279.18
5.2.80.0030.0319.18
5.2.70.0060.0309.18
5.2.60.0060.0379.13
5.2.50.0070.0279.10
5.2.40.0020.0309.07
5.2.30.0060.0379.05
5.2.20.0050.0309.04
5.2.10.0030.0308.95
5.2.00.0040.0308.80
5.1.60.0060.0228.09
5.1.50.0050.0238.08
5.1.40.0040.0248.07
5.1.30.0080.0228.41
5.1.20.0030.0278.44
5.1.10.0010.0288.16
5.1.00.0040.0308.16
5.0.50.0020.0216.64
5.0.40.0050.0186.50
5.0.30.0040.0316.31
5.0.20.0050.0216.28
5.0.10.0020.0216.26
5.0.00.0020.0316.25
4.4.90.0010.0174.78
4.4.80.0030.0214.75
4.4.70.0050.0184.75
4.4.60.0040.0144.75
4.4.50.0030.0154.77
4.4.40.0040.0234.71
4.4.30.0010.0174.76
4.4.20.0040.0144.85
4.4.10.0040.0144.84
4.4.00.0020.0264.76
4.3.110.0020.0194.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0040.0294.58
4.3.70.0010.0164.63
4.3.60.0020.0154.63
4.3.50.0030.0144.63
4.3.40.0020.0244.54
4.3.30.0020.0153.30
4.3.20.0020.0153.28
4.3.10.0030.0143.23
4.3.00.0030.0236.74

preferences:
44.05 ms | 400 KiB | 5 Q