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 = "someonefff.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.40.0000.01418.58
8.3.30.0140.00319.14
8.3.20.0020.00520.18
8.3.10.0030.00520.39
8.3.00.0000.00819.43
8.2.170.0070.00722.96
8.2.160.0070.00720.47
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00320.82
8.2.110.0060.00322.14
8.2.100.0080.00317.66
8.2.90.0040.00419.09
8.2.80.0030.00617.97
8.2.70.0030.00517.63
8.2.60.0040.00417.92
8.2.50.0040.00418.07
8.2.40.0000.00718.09
8.2.30.0070.00019.23
8.2.20.0040.00417.53
8.2.10.0050.00317.91
8.2.00.0000.00717.54
8.1.270.0060.00323.83
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00623.78
8.1.230.0070.00419.21
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0000.01116.98
8.1.190.0050.00317.22
8.1.180.0080.00018.10
8.1.170.0000.00918.44
8.1.160.0040.00421.98
8.1.150.0050.00318.80
8.1.140.0080.00017.39
8.1.130.0030.00317.88
8.1.120.0000.00817.35
8.1.110.0040.00417.44
8.1.100.0000.00717.27
8.1.90.0070.00017.38
8.1.80.0000.00717.38
8.1.70.0050.00317.27
8.1.60.0000.00817.51
8.1.50.0040.00417.47
8.1.40.0040.00417.48
8.1.30.0030.00717.53
8.1.20.0070.00017.50
8.1.10.0060.00317.45
8.1.00.0040.00417.42
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0080.00018.25
8.0.270.0000.00717.11
8.0.260.0030.00317.20
8.0.250.0040.00416.88
8.0.240.0040.00416.93
8.0.230.0050.00216.87
8.0.220.0040.00416.84
8.0.210.0060.00016.82
8.0.200.0030.00316.90
8.0.190.0040.00416.74
8.0.180.0000.00716.77
8.0.170.0000.00816.87
8.0.160.0070.00016.88
8.0.150.0070.00016.74
8.0.140.0030.00316.80
8.0.130.0030.00313.24
8.0.120.0040.00416.67
8.0.110.0040.00416.80
8.0.100.0000.00716.73
8.0.90.0040.00416.84
8.0.80.0070.01016.79
8.0.70.0050.00216.76
8.0.60.0040.00416.74
8.0.50.0050.00216.89
8.0.30.0080.01116.94
8.0.20.0070.01417.40
8.0.10.0040.00417.00
8.0.00.0120.00516.61
7.4.330.0000.00515.00
7.4.320.0000.00616.55
7.4.300.0030.00316.63
7.4.290.0070.00016.49
7.4.280.0040.00416.52
7.4.270.0000.00616.52
7.4.260.0070.00016.53
7.4.250.0070.00016.52
7.4.240.0030.00316.54
7.4.230.0000.00716.49
7.4.220.0110.01416.63
7.4.210.0060.00816.45
7.4.200.0030.00616.68
7.4.160.0120.00316.41
7.4.150.0110.00917.40
7.4.140.0130.00517.86
7.4.130.0110.00816.48
7.4.120.0090.00816.49
7.4.110.0130.01016.44
7.4.100.0130.00316.35
7.4.90.0160.00616.28
7.4.80.0070.01116.48
7.4.70.0060.01616.31
7.4.60.0120.00416.42
7.4.50.0040.00416.08
7.4.40.0140.00316.49
7.4.30.0070.01016.50
7.4.10.0090.00914.69
7.4.00.0060.01215.08
7.3.330.0000.00613.20
7.3.320.0060.00013.24
7.3.310.0050.00216.10
7.3.300.0030.00316.18
7.3.290.0060.00916.22
7.3.280.0110.00616.20
7.3.270.0090.01417.40
7.3.260.0070.01116.29
7.3.250.0120.00616.34
7.3.240.0120.00916.28
7.3.230.0080.00816.39
7.3.210.0070.01116.46
7.3.200.0030.01419.39
7.3.190.0100.00716.32
7.3.180.0040.01216.38
7.3.170.0140.00916.30
7.3.160.0070.00716.28
7.3.130.0030.01314.55
7.3.120.0100.00314.73
7.3.110.0000.01514.78
7.3.100.0080.00814.71
7.3.90.0070.00714.79
7.3.80.0130.00314.61
7.3.70.0090.00614.60
7.3.60.0070.00414.78
7.3.50.0060.00614.57
7.3.40.0040.01214.46
7.3.30.0040.01114.82
7.3.20.0030.00916.38
7.3.10.0070.00316.61
7.3.00.0120.00316.56
7.2.330.0070.01116.59
7.2.320.0070.01016.52
7.2.310.0090.00916.58
7.2.300.0070.01416.38
7.2.290.0100.00616.65
7.2.260.0030.01315.12
7.2.250.0070.01115.12
7.2.240.0060.00915.13
7.2.230.0070.01415.01
7.2.220.0070.01014.87
7.2.210.0070.00715.00
7.2.200.0120.00314.77
7.2.190.0040.01115.03
7.2.180.0030.01214.86
7.2.170.0090.00614.95
7.2.160.0030.01215.02
7.2.150.0030.00616.56
7.2.140.0080.00416.68
7.2.130.0070.00716.61
7.2.120.0090.00616.42
7.2.110.0040.01116.83
7.2.100.0070.01016.55
7.2.90.0030.00916.90
7.2.80.0110.00716.97
7.2.70.0060.00316.55
7.2.60.0050.00616.82
7.2.50.0060.00316.60
7.2.40.0040.01216.91
7.2.30.0070.01016.64
7.2.20.0060.01116.68
7.2.10.0050.00516.84
7.2.00.0050.01217.96
7.1.330.0030.01015.61
7.1.320.0060.00615.46
7.1.310.0080.00815.87
7.1.300.0030.01015.59
7.1.290.0060.00915.77
7.1.280.0000.00815.59
7.1.270.0040.00715.71
7.1.260.0060.01215.74
7.1.250.0060.00615.46
7.1.240.0040.00815.79
7.1.230.0030.01015.91
7.1.220.0140.00015.73
7.1.210.0030.01015.62
7.1.200.0090.00615.71
7.1.190.0030.01015.58
7.1.180.0080.00315.79
7.1.170.0060.00615.64
7.1.160.0100.00315.74
7.1.150.0070.00415.48
7.1.140.0030.01015.54
7.1.130.0030.01015.67
7.1.120.0040.00815.55
7.1.110.0030.01015.74
7.1.100.0050.00917.04
7.1.90.0070.01115.56
7.1.80.0000.01515.51
7.1.70.0000.01216.37
7.1.60.0060.01317.45
7.1.50.0080.01116.13
7.1.40.0030.01015.58
7.1.30.0060.00615.47
7.1.20.0060.00615.61
7.1.10.0070.00715.79
7.1.00.0030.04519.04
7.0.330.0030.00715.13
7.0.320.0030.01415.22
7.0.310.0030.01015.23
7.0.300.0000.01015.34
7.0.290.0040.01115.16
7.0.280.0040.00715.04
7.0.270.0070.00715.46
7.0.260.0060.00615.11
7.0.250.0040.00415.40
7.0.240.0070.01015.19
7.0.230.0030.01315.30
7.0.220.0070.00715.21
7.0.210.0040.00415.45
7.0.200.0050.00716.08
7.0.190.0000.01415.19
7.0.180.0050.00515.21
7.0.170.0060.00315.24
7.0.160.0060.00615.13
7.0.150.0030.00915.51
7.0.140.0040.03718.69
7.0.130.0000.00715.02
7.0.120.0040.01115.48
7.0.110.0080.00615.41
7.0.100.0000.00915.45
7.0.90.0110.00015.08
7.0.80.0030.01015.25
7.0.70.0040.01215.47
7.0.60.0080.04417.67
7.0.50.0050.03216.78
7.0.40.0080.04016.85
7.0.30.0150.04416.78
7.0.20.0130.03116.79
7.0.10.0120.02516.76
7.0.00.0060.04316.84
5.6.400.0080.00314.38
5.6.390.0070.00714.10
5.6.380.0100.00314.41
5.6.370.0070.00714.39
5.6.360.0090.00014.17
5.6.350.0090.00614.50
5.6.340.0100.00014.29
5.6.330.0000.01513.91
5.6.320.0000.01414.46
5.6.310.0060.00614.49
5.6.300.0030.01014.41
5.6.290.0090.00314.45
5.6.280.0030.04017.78
5.6.270.0080.00814.57
5.6.260.0040.01114.10
5.6.250.0080.00314.27
5.6.240.0040.00714.35
5.6.230.0060.00614.22
5.6.220.0070.01014.09
5.6.210.0030.04517.59
5.6.200.0030.02516.13
5.6.190.0060.02317.32
5.6.180.0120.04617.44
5.6.170.0070.02717.46
5.6.160.0020.03417.41
5.6.150.0020.03816.13
5.6.140.0070.04016.21
5.6.130.0080.04416.24
5.6.120.0080.02517.56
5.6.110.0100.04417.77
5.6.100.0070.03817.70
5.6.90.0090.02617.64
5.6.80.0100.02717.25
5.6.70.1870.02817.35
5.6.60.0040.00814.31
5.6.50.0040.01113.89
5.6.40.0000.01514.46
5.6.30.0060.00314.33
5.6.20.0060.00314.25
5.6.10.0030.00914.01
5.6.00.0060.00613.89
5.5.380.0120.00013.84
5.5.370.0030.00913.86
5.5.360.0070.00714.00
5.5.350.0080.03317.12
5.5.340.0110.02615.89
5.5.330.0110.03317.14
5.5.320.0290.03717.28
5.5.310.0230.03717.30
5.5.300.0070.04216.13
5.5.290.0030.04016.09
5.5.280.0080.04517.55
5.5.270.0040.02317.30
5.5.260.0080.03817.43
5.5.250.0130.03217.53
5.5.240.0200.01817.18
5.5.230.0030.01014.16
5.5.220.0060.00813.92
5.5.210.0030.00614.19
5.5.200.0000.01314.13
5.5.190.0060.00314.25
5.5.180.0030.00614.07
5.5.170.0000.01114.34
5.5.160.0000.01514.27
5.5.150.0100.00014.03
5.5.140.0040.00813.82
5.5.130.0130.00314.27
5.5.120.0000.01214.05
5.5.110.0030.01014.02
5.5.100.0040.00813.86
5.5.90.0060.00614.23
5.5.80.0050.00814.30
5.5.70.0080.00413.99
5.5.60.0030.00714.19
5.5.50.0070.01014.12
5.5.40.0060.00614.00
5.5.30.0060.00314.20
5.5.20.0000.01114.10
5.5.10.0060.01014.22
5.5.00.0040.01214.05
5.4.450.0170.02515.14
5.4.440.0480.03215.15
5.4.430.0380.02815.32
5.4.420.0350.03015.09
5.4.410.0370.02915.05
5.4.400.0420.03214.87
5.4.390.0430.03214.87
5.4.380.0250.03014.74
5.4.370.0270.03014.85
5.4.360.0230.03414.65
5.4.350.0220.04314.86
5.4.340.0250.02514.86
5.4.330.0110.00011.00
5.4.320.0030.02211.75
5.4.310.0040.02511.61
5.4.300.0050.02111.69
5.4.290.0020.02511.59
5.4.280.0040.02011.67
5.4.270.0020.02411.58
5.4.260.0040.02111.49
5.4.250.0090.01911.65
5.4.240.0050.02311.63
5.4.230.0030.02311.60
5.4.220.0070.01911.65
5.4.210.0040.02211.69
5.4.200.0020.02411.66
5.4.190.0060.01811.70
5.4.180.0040.02211.68
5.4.170.0060.01811.49
5.4.160.0060.02011.41
5.4.150.0060.02111.71
5.4.140.0060.02011.51
5.4.130.0040.02611.30
5.4.120.0050.02611.49
5.4.110.0080.01911.24
5.4.100.0050.02111.38
5.4.90.0090.01811.49
5.4.80.0050.02211.34
5.4.70.0060.02011.29
5.4.60.0030.02211.46
5.4.50.0070.01911.41
5.4.40.0080.01811.49
5.4.30.0050.02211.50
5.4.20.0060.02111.34
5.4.10.0070.01811.32
5.4.00.0050.02211.11
5.3.290.0050.04112.80
5.3.280.0080.03912.71
5.3.270.0030.04012.72
5.3.260.0070.03612.72
5.3.250.0050.03912.71
5.3.240.0080.03612.72
5.3.230.0060.03612.71
5.3.220.0040.03812.68
5.3.210.0060.04512.68
5.3.200.0080.03312.68
5.3.190.0060.04112.68
5.3.180.0070.03412.67
5.3.170.0080.04012.66
5.3.160.0060.03512.67
5.3.150.0080.03412.67
5.3.140.0030.03812.66
5.3.130.0060.03712.66
5.3.120.0040.03912.66
5.3.110.0090.04212.66
5.3.100.0030.03812.12
5.3.90.0090.03912.10
5.3.80.0020.04012.09
5.3.70.0080.03912.09
5.3.60.0060.03512.08
5.3.50.0080.03312.02
5.3.40.0060.03612.02
5.3.30.0050.03511.98
5.3.20.0060.03511.76
5.3.10.0060.03411.73
5.3.00.0040.04511.72
5.2.170.0080.0329.21
5.2.160.0050.0309.22
5.2.150.0050.0299.22
5.2.140.0020.0399.21
5.2.130.0040.0299.18
5.2.120.0040.0299.18
5.2.110.0070.0269.19
5.2.100.0050.0289.18
5.2.90.0030.0309.18
5.2.80.0050.0299.18
5.2.70.0060.0289.17
5.2.60.0040.0329.13
5.2.50.0050.0309.09
5.2.40.0050.0279.07
5.2.30.0040.0289.05
5.2.20.0040.0299.04
5.2.10.0030.0288.94
5.2.00.0070.0288.80
5.1.60.0030.0318.09
5.1.50.0030.0258.09
5.1.40.0050.0278.07
5.1.30.0060.0278.42
5.1.20.0020.0278.44
5.1.10.0060.0308.16
5.1.00.0060.0288.16
5.0.50.0040.0246.64
5.0.40.0040.0186.50
5.0.30.0030.0316.32
5.0.20.0050.0186.28
5.0.10.0010.0226.26
5.0.00.0020.0316.25
4.4.90.0030.0154.78
4.4.80.0010.0164.76
4.4.70.0020.0164.75
4.4.60.0040.0134.75
4.4.50.0010.0174.77
4.4.40.0020.0254.71
4.4.30.0020.0154.76
4.4.20.0050.0134.85
4.4.10.0020.0154.85
4.4.00.0040.0224.76
4.3.110.0030.0154.67
4.3.100.0010.0164.66
4.3.90.0010.0164.63
4.3.80.0030.0234.58
4.3.70.0010.0174.63
4.3.60.0040.0134.63
4.3.50.0030.0214.63
4.3.40.0010.0304.54
4.3.30.0030.0143.30
4.3.20.0010.0163.28
4.3.10.0000.0173.24
4.3.00.0170.0176.74

preferences:
50.12 ms | 400 KiB | 5 Q