3v4l.org

run code in 300+ PHP versions simultaneously
<?php $main_domains = ['example.co.uk','example.com','example.org']; $sub_domains = ['sub.example.com','ftp.example.org','ftp.example.co.uk','mail.example.com']; $results = []; array_walk( $sub_domains, function($subdomain) use ($main_domains, &$results) { foreach ($main_domains as $domain) { // or however you're checking if (strpos($subdomain, $domain) !== false) { $results[$domain][] = $subdomain; } } } ); var_dump($results);

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.0090.00616.50
8.3.60.0040.01216.50
8.3.50.0150.00722.00
8.3.40.0070.00718.71
8.3.30.0110.00418.89
8.3.20.0080.00021.95
8.3.10.0070.00021.72
8.3.00.0040.00423.66
8.2.190.0190.00016.75
8.2.180.0100.01016.50
8.2.170.0060.01222.96
8.2.160.0070.00720.41
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00819.64
8.2.120.0030.00526.35
8.2.110.0030.00622.00
8.2.100.0090.00317.97
8.2.90.0060.00317.75
8.2.80.0030.00617.97
8.2.70.0030.00617.93
8.2.60.0050.00318.34
8.2.50.0050.00318.10
8.2.40.0000.00819.25
8.2.30.0000.00719.24
8.2.20.0090.00018.12
8.2.10.0000.00818.18
8.2.00.0040.00417.77
8.1.280.0120.00325.92
8.1.270.0040.00423.73
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00320.74
8.1.230.0040.00820.87
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00918.52
8.1.160.0000.00722.05
8.1.150.0070.00018.84
8.1.140.0070.00019.59
8.1.130.0000.00717.57
8.1.120.0000.00817.48
8.1.110.0030.00317.48
8.1.100.0040.00417.52
8.1.90.0040.00417.46
8.1.80.0040.00417.41
8.1.70.0030.00317.34
8.1.60.0070.00017.61
8.1.50.0050.00317.50
8.1.40.0000.00817.53
8.1.30.0040.00417.66
8.1.20.0060.00317.54
8.1.10.0050.00317.55
8.1.00.0050.00317.42
8.0.300.0000.00719.51
8.0.290.0000.00716.75
8.0.280.0030.00318.43
8.0.270.0030.00517.27
8.0.260.0000.00617.17
8.0.250.0000.00717.00
8.0.240.0050.00216.94
8.0.230.0000.00716.84
8.0.220.0000.00716.92
8.0.210.0040.00416.89
8.0.200.0000.00716.81
8.0.190.0040.00416.84
8.0.180.0000.00716.92
8.0.170.0050.00316.88
8.0.160.0000.00716.88
8.0.150.0070.00016.80
8.0.140.0000.00916.81
8.0.130.0030.00313.27
8.0.120.0000.00816.84
8.0.110.0000.00716.86
8.0.100.0000.00716.84
8.0.90.0040.00416.68
8.0.80.0060.00916.87
8.0.70.0040.00416.82
8.0.60.0000.00716.88
8.0.50.0030.00516.76
8.0.30.0100.00917.15
8.0.20.0080.01117.40
8.0.10.0000.00717.04
8.0.00.0120.00616.68
7.4.330.0000.00615.55
7.4.320.0060.00016.53
7.4.300.0000.00616.59
7.4.290.0030.00316.59
7.4.280.0040.00416.43
7.4.270.0000.00716.35
7.4.260.0070.00316.48
7.4.250.0000.00716.44
7.4.240.0060.00116.53
7.4.230.0000.00716.66
7.4.220.0130.00316.69
7.4.210.0120.00716.50
7.4.200.0070.00016.58
7.4.160.0090.01116.52
7.4.150.0140.00517.40
7.4.140.0050.01217.86
7.4.130.0050.01316.54
7.4.120.0080.00916.60
7.4.110.0090.00916.41
7.4.100.0100.00716.55
7.4.90.0120.00816.62
7.4.80.0100.00819.39
7.4.70.0000.01616.67
7.4.60.0110.00816.58
7.4.50.0090.00916.46
7.4.40.0090.01216.50
7.4.30.0170.00016.41
7.4.00.0140.00315.07
7.3.330.0030.00313.21
7.3.320.0000.00513.37
7.3.310.0030.00316.36
7.3.300.0060.00016.32
7.3.290.0070.00016.19
7.3.280.0090.00716.32
7.3.270.0090.00917.40
7.3.260.0080.01016.42
7.3.250.0070.01216.45
7.3.240.0020.01516.38
7.3.230.0150.00316.39
7.3.210.0090.00916.30
7.3.200.0130.00316.32
7.3.190.0110.00616.35
7.3.180.0130.00316.36
7.3.170.0100.00716.66
7.3.160.0120.00916.60
7.2.330.0090.00916.66
7.2.320.0140.00316.73
7.2.310.0060.01416.61
7.2.300.0070.01116.39
7.2.290.0060.01016.60
7.2.60.0060.00816.65
7.2.00.0040.01119.25
7.1.200.0040.00815.80
7.1.70.0050.00317.10
7.1.60.0090.00317.38
7.1.00.0070.07322.57
7.0.200.0250.00414.71
7.0.120.0430.05020.31
7.0.110.0470.05320.36
7.0.100.0370.05720.21
7.0.90.0400.04720.28
7.0.80.0300.06320.14
7.0.70.0330.07320.24
7.0.60.0370.04720.29
7.0.50.0300.06720.26
7.0.40.0370.07020.27
7.0.30.0300.06320.28
7.0.20.0400.05720.32
7.0.10.0270.06320.26
7.0.00.0370.05720.27
5.6.260.0100.05721.07
5.6.250.0170.07021.04
5.6.240.0070.06720.75
5.6.230.0130.07321.02
5.6.220.0330.05020.84
5.6.210.0030.06320.86
5.6.200.0130.07720.86
5.6.190.0230.04720.75
5.6.180.0170.05320.99
5.6.170.0170.05321.01
5.6.160.0100.05721.01
5.6.150.0170.05321.04
5.6.140.0200.05020.85
5.6.130.0100.06020.94
5.6.120.0170.05321.06
5.6.110.0130.06021.08
5.6.100.0130.05720.93
5.6.90.0170.06320.81
5.6.80.0070.05320.41
5.6.70.0130.05320.41
5.6.60.0130.06320.21
5.6.50.0130.05020.47
5.6.40.0100.06020.19
5.6.30.0170.05020.45
5.6.20.0100.08020.44
5.6.10.0070.05720.39
5.6.00.0130.05020.16

preferences:
29.23 ms | 401 KiB | 5 Q