3v4l.org

run code in 300+ PHP versions simultaneously
<?php function urlWhitelisted($url) { $always_allowed = array('localhost'); $whitelisted_domains = array('fxnetworks.com') + $always_allowed; $domain = parse_url($url, PHP_URL_HOST); if (strpos($url, "/") === 0 || in_array($domain, $whitelisted_domains)) { return true; } foreach ($whitelisted_domains as $whitelisted_domain) { $whitelisted_domain = '.' . $whitelisted_domain; if (strpos($domain, $whitelisted_domain) === (strlen($domain) - strlen($whitelisted_domain))) { return true; } } return false; } $domains = array('/user', 'localhost/user', 'http://localhost:4039', 'http://fxnetworks.com/user', 'http://google.com', 'google.com', 'fxnetworks.com.google.com'); foreach($domains as $domain) { var_dump(urlWhitelisted($domain)); }

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.0150.00318.27
8.3.50.0180.00622.02
8.3.40.0140.00018.82
8.3.30.0100.01019.10
8.3.20.0040.00420.21
8.3.10.0000.00823.66
8.3.00.0080.00020.89
8.2.180.0120.00618.16
8.2.170.0070.00722.96
8.2.160.0140.00020.39
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0140.00026.16
8.2.120.0040.00419.36
8.2.110.0090.00020.52
8.2.100.0040.00817.97
8.2.90.0050.00319.23
8.2.80.0000.00917.97
8.2.70.0000.00917.63
8.2.60.0050.00917.55
8.2.50.0060.00318.07
8.2.40.0000.00819.88
8.2.30.0000.00918.29
8.2.20.0060.00317.78
8.2.10.0050.00218.12
8.2.00.0080.00017.71
8.1.280.0030.01225.92
8.1.270.0060.00323.79
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00323.97
8.1.230.0090.00317.51
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.11
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0000.00918.30
8.1.160.0050.00222.00
8.1.150.0040.00418.66
8.1.140.0040.00417.42
8.1.130.0030.00319.56
8.1.120.0000.00717.47
8.1.110.0040.00417.44
8.1.100.0080.00017.44
8.1.90.0040.00417.55
8.1.80.0000.00717.48
8.1.70.0070.00017.46
8.1.60.0000.00817.56
8.1.50.0040.00417.40
8.1.40.0000.00817.46
8.1.30.0040.00417.63
8.1.20.0000.00717.62
8.1.10.0040.00417.44
8.1.00.0040.00417.50
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0040.00418.34
8.0.270.0000.00717.16
8.0.260.0050.00217.14
8.0.250.0000.00716.93
8.0.240.0080.00017.01
8.0.230.0000.00716.97
8.0.220.0070.00016.92
8.0.210.0070.00016.91
8.0.200.0000.00617.04
8.0.190.0000.00717.05
8.0.180.0070.00016.91
8.0.170.0040.00417.02
8.0.160.0040.00416.89
8.0.150.0070.00316.88
8.0.140.0040.00416.95
8.0.130.0030.00313.45
8.0.120.0040.00416.80
8.0.110.0070.00016.93
8.0.100.0000.00716.97
8.0.90.0030.00516.79
8.0.80.0060.00916.88
8.0.70.0000.00916.90
8.0.60.0000.00816.95
8.0.50.0080.00016.77
8.0.30.0120.00917.09
8.0.20.0130.00617.40
8.0.10.0040.00417.01
8.0.00.0050.01216.86
7.4.330.0050.00015.16
7.4.320.0030.00316.60
7.4.300.0060.00016.43
7.4.290.0030.00316.58
7.4.280.0000.00716.66
7.4.270.0070.00016.61
7.4.260.0000.00816.57
7.4.250.0030.00516.55
7.4.240.0040.00416.60
7.4.230.0000.00716.49
7.4.220.0100.01316.70
7.4.210.0100.00316.50
7.4.200.0030.00316.68
7.4.160.0120.00616.37
7.4.150.0090.00917.40
7.4.140.0130.00517.86
7.4.130.0120.00616.60
7.4.120.0100.00716.66
7.4.110.0030.01316.71
7.4.100.0090.00916.51
7.4.90.0080.01116.45
7.4.80.0110.00719.39
7.4.70.0150.00316.39
7.4.60.0040.01416.50
7.4.50.0030.00616.29
7.4.40.0110.00616.28
7.4.30.0100.00616.54
7.4.00.0140.00314.57
7.3.330.0000.00713.39
7.3.320.0030.00313.35
7.3.310.0030.00316.26
7.3.300.0040.00416.38
7.3.290.0040.01016.35
7.3.280.0100.00816.41
7.3.270.0160.00317.40
7.3.260.0110.00716.36
7.3.250.0110.01116.45
7.3.240.0060.01216.32
7.3.230.0060.01416.39
7.3.210.0130.00316.35
7.3.200.0100.00719.39
7.3.190.0060.01616.27
7.3.180.0050.01116.51
7.3.170.0060.01616.45
7.3.160.0060.01016.54
7.3.120.0040.01215.03
7.2.330.0140.00316.61
7.2.320.0030.01416.66
7.2.310.0100.01316.77
7.2.300.0070.01016.52
7.2.290.0380.01216.66
7.2.60.0050.00316.86
7.1.200.0040.00715.89
7.1.70.0070.00716.95
7.1.60.0000.02619.70
7.1.50.0070.01816.96
7.1.00.0000.08022.52
7.0.200.0000.00716.77
7.0.140.0000.06721.92
7.0.110.0030.09019.90
7.0.100.0100.07719.92
7.0.90.0070.08019.99
7.0.80.0070.04019.87
7.0.70.0000.05019.99
7.0.60.0230.04319.88
7.0.50.0270.04320.37
7.0.40.0000.04320.02
7.0.30.0030.04720.25
7.0.20.0070.07719.96
7.0.10.0070.04020.14
7.0.00.0070.04020.02
5.6.280.0030.07321.08
5.6.260.0070.05020.57
5.6.250.0130.08020.81
5.6.240.0130.08020.64
5.6.230.0130.05020.63
5.6.220.0100.03320.48
5.6.210.0070.03720.50
5.6.200.0030.05021.16
5.6.190.0000.05021.22
5.6.180.0130.03721.14
5.6.170.0130.06021.27
5.6.160.0100.06721.19
5.6.150.0100.05321.14
5.6.140.0030.04021.14
5.6.130.0000.04721.25
5.6.120.0070.04021.19
5.6.110.0030.07721.14
5.6.100.0170.07321.21
5.6.90.0130.07020.93
5.6.80.0100.04320.48
5.6.70.0100.03020.34
5.6.60.0030.04020.64
5.6.50.0100.03720.62
5.6.40.0070.03720.41
5.6.30.0100.03720.30
5.6.20.0000.04320.57
5.6.10.0000.04320.55
5.6.00.0030.04020.28
5.5.380.0070.08320.41
5.5.370.0000.08020.52
5.5.360.0030.04020.26
5.5.350.0030.04020.35
5.5.340.0000.04320.89
5.5.330.0000.04320.93
5.5.320.0070.07020.90
5.5.310.0130.03320.98
5.5.300.0070.05320.96
5.5.290.0100.04320.91
5.5.280.0030.04320.78
5.5.270.0030.04020.80
5.5.260.0000.05320.94
5.5.250.0100.08720.70
5.5.240.0070.05720.13
5.5.230.0030.04020.09
5.5.220.0030.04020.25
5.5.210.0070.04020.29
5.5.200.0030.04720.25
5.5.190.0100.03720.06
5.5.180.0030.04020.14
5.5.160.0070.03720.16
5.5.150.0070.03720.29
5.5.140.0030.04020.37
5.5.130.0000.04720.19
5.5.120.0000.07320.13
5.5.110.0030.05020.37
5.5.100.0000.04020.06
5.5.90.0030.04020.28
5.5.80.0100.07320.20
5.5.70.0030.06020.04
5.5.60.0130.07319.99
5.5.50.0170.07720.01
5.5.40.0070.06320.07
5.5.30.0070.07720.26
5.5.20.0070.07720.13
5.5.10.0030.08320.04
5.5.00.0000.05320.04
5.4.450.0070.03319.28
5.4.440.0030.04319.28
5.4.430.0030.07319.33
5.4.420.0100.04319.46
5.4.410.0030.07319.34
5.4.400.0000.04019.02
5.4.390.0000.07019.18
5.4.380.0070.07019.09
5.4.370.0070.03319.02
5.4.360.0070.04019.00
5.4.350.0030.05719.09
5.4.340.0000.04019.16
5.4.320.0030.06718.99
5.4.310.0030.03719.00
5.4.300.0030.04319.03
5.4.290.0000.03719.31
5.4.280.0030.03719.15
5.4.270.0030.03319.18
5.4.260.0070.04719.31
5.4.250.0000.04019.01
5.4.240.0070.07019.03
5.4.230.0030.05019.30
5.4.220.0130.05019.00
5.4.210.0070.08019.23
5.4.200.0070.08019.22
5.4.190.0030.07719.00
5.4.180.0100.05719.15
5.4.170.0100.07319.21
5.4.160.0070.07319.24
5.4.150.0100.04719.16
5.4.140.0030.07016.38
5.4.130.0030.07316.48
5.4.120.0070.05716.32
5.4.110.0130.07016.42
5.4.100.0100.06716.53
5.4.90.0030.07716.46
5.4.80.0100.06316.45
5.4.70.0100.06716.64
5.4.60.0030.07316.25
5.4.50.0030.07716.47
5.4.40.0070.08016.57
5.4.30.0100.05016.52
5.4.20.0070.07016.44
5.4.10.0030.07316.44
5.4.00.0100.07015.74
5.3.290.0070.03314.69
5.3.280.0070.07314.59
5.3.270.0030.08714.66
5.3.260.0170.06714.64
5.3.250.0030.07714.75
5.3.240.0100.06314.62
5.3.230.0070.07314.57
5.3.220.0030.04014.64
5.3.210.0070.07314.59
5.3.200.0070.07314.56
5.3.190.0130.06314.65
5.3.180.0070.08014.42
5.3.170.0070.07014.65
5.3.160.0070.07314.60
5.3.150.0170.06314.57
5.3.140.0200.06314.57
5.3.130.0070.07014.57
5.3.120.0130.07014.55
5.3.110.0030.08014.51
5.3.100.0130.07314.06
5.3.90.0070.07314.03
5.3.80.0070.07314.11
5.3.70.0070.08014.07
5.3.60.0130.07014.04
5.3.50.0100.07014.07
5.3.40.0070.06313.92
5.3.30.0130.06713.98
5.3.20.0100.06313.72
5.3.10.0070.07713.51
5.3.00.0100.07013.65
5.2.170.0070.06711.85
5.2.160.0170.04711.85
5.2.150.0130.05311.85
5.2.140.0100.06011.85
5.2.130.0030.06711.85
5.2.120.0130.04711.85
5.2.110.0100.05711.85
5.2.100.0000.07011.85
5.2.90.0000.06311.85
5.2.80.0070.06311.85
5.2.70.0070.06011.85
5.2.60.0100.05711.85
5.2.50.0130.04311.85
5.2.40.0030.06711.85
5.2.30.0030.06711.85
5.2.20.0030.05711.85
5.2.10.0070.05711.85
5.2.00.0000.06711.85
5.1.60.0070.04711.85
5.1.50.0100.04311.85
5.1.40.0070.02311.85
5.1.30.0030.05711.85
5.1.20.0070.03311.85
5.1.10.0030.04711.85
5.1.00.0100.05011.85
5.0.50.0030.05011.85
5.0.40.0070.04011.85
5.0.30.0030.06711.85
5.0.20.0030.04311.85
5.0.10.0100.03011.85
5.0.00.0070.06011.85
4.4.90.0000.03711.85
4.4.80.0030.02311.85
4.4.70.0030.03011.85
4.4.60.0070.03011.85
4.4.50.0000.03711.85
4.4.40.0070.02711.85
4.4.30.0070.03011.85
4.4.20.0030.03711.85
4.4.10.0100.02711.85
4.4.00.0030.05311.85
4.3.110.0000.03711.85
4.3.100.0070.03011.85
4.3.90.0070.03011.85
4.3.80.0030.05311.85
4.3.70.0000.03711.85
4.3.60.0000.03711.85
4.3.50.0130.02711.85
4.3.40.0000.05011.85
4.3.30.0000.04011.85
4.3.20.0070.03011.85
4.3.10.0030.03311.85
4.3.00.0030.03311.85

preferences:
46.31 ms | 401 KiB | 5 Q