3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Returns list of subdomains * @param string $domain * @return array */ function getAllSubDomain($domain) { //strip '<prefix>:' first $dpos = strpos($domain, ':'); if ($dpos !== false) { $domain = substr($domain, $dpos+1); } else { $domain = $domain; } $domainParts = explode('.', str_replace("'", '', $domain)); $ret = array(); for ($off = sizeof($domainParts) -1; $off >= 0; $off--) { $ret[] = implode('.', array_slice($domainParts, $off)); } return $ret; } $subDomains = getAllSubdomain('oxadmin.pr.citeeze.com'); var_export($subDomains); echo "\n"; $queryPart = $q = "SELECT modifiers m" . " FROM delivery_host_modifiers" . " WHERE host IN ('" . implode("','", $subDomains) . "')" . " ORDER BY LENGTH(host) " ; var_export($queryPart); $result = json_decode('[{ "id": 78852, "domain": "local.dev.citeeze.com", "categories": null, "added": "2014-12-04 06:35:38", "updated": "2014-12-10 21:23:34", "visible": 1, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 89652, "domain": "www.citeeze.com", "categories": null, "added": "2014-12-04 06:47:25", "updated": "2014-12-10 21:29:10", "visible": 1, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 356163, "domain": "citeeze.com", "categories": null, "added": "2015-01-20 13:42:50", "updated": "2015-01-20 13:42:50", "visible": 1, "user_added": 1, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 2739296, "domain": "dev.citeeze.com", "categories": null, "added": "2016-04-18 05:11:23", "updated": "2016-04-18 05:11:23", "visible": 0, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 4399187, "domain": "adunit.brendan.citeeze.com", "categories": null, "added": "2016-08-08 17:26:26", "updated": "2016-08-08 17:26:26", "visible": 1, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 5862092, "domain": "tools.brendan.citeeze.com", "categories": null, "added": "2016-09-19 21:22:07", "updated": "2016-09-19 21:22:07", "visible": 1, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 6335525, "domain": "oxadmin.pr.citeeze.com", "categories": null, "added": "2017-01-09 16:53:54", "updated": "2017-01-09 16:53:54", "visible": 0, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 6335537, "domain": "pr.citeeze.com", "categories": "", "added": "2017-07-11 12:53:18", "updated": "2017-07-11 12:53:25", "visible": 0, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 }, { "id": 6335540, "domain": "test.oxadmin.prciteeze.com", "categories": null, "added": "2017-07-11 11:56:42", "updated": "2017-07-11 11:56:42", "visible": 0, "user_added": 0, "mobile": 0, "requests": 0, "completion": 0.00 } ]'); var_export($result, true);

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.0090.00616.88
8.3.50.0140.00316.51
8.3.40.0070.00718.85
8.3.30.0140.00018.66
8.3.20.0060.00320.39
8.3.10.0030.00623.61
8.3.00.0050.00322.00
8.2.180.0070.01118.13
8.2.170.0110.00422.96
8.2.160.0100.00319.07
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00419.12
8.2.120.0040.00426.35
8.2.110.0040.00421.04
8.2.100.0060.00617.91
8.2.90.0000.00819.25
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0080.00018.10
8.2.40.0040.00420.43
8.2.30.0040.00421.21
8.2.20.0080.00018.16
8.2.10.0000.00718.07
8.2.00.0080.00018.24
8.1.280.0090.00625.92
8.1.270.0070.00022.19
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0080.00319.56
8.1.230.0060.00618.95
8.1.220.0050.00317.78
8.1.210.0030.00618.77
8.1.200.0000.00917.48
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0080.00018.64
8.1.160.0070.00019.00
8.1.150.0040.00418.95
8.1.140.0030.00619.48
8.1.130.0000.00818.88
8.1.120.0050.00217.46
8.1.110.0080.00017.34
8.1.100.0050.00317.46
8.1.90.0050.00317.48
8.1.80.0040.00417.54
8.1.70.0000.00817.38
8.1.60.0040.00417.67
8.1.50.0030.00617.54
8.1.40.0000.00817.44
8.1.30.0030.00517.57
8.1.20.0080.00017.53
8.1.10.0030.00517.48
8.1.00.0000.00817.36
8.0.300.0040.00419.96
8.0.290.0040.00416.61
8.0.280.0000.00718.48
8.0.270.0040.00417.28
8.0.260.0000.00818.44
8.0.250.0030.00316.97
8.0.240.0030.00317.01
8.0.230.0070.00016.93
8.0.220.0000.00716.81
8.0.210.0030.00316.90
8.0.200.0000.00616.92
8.0.190.0060.00316.99
8.0.180.0040.00416.91
8.0.170.0070.00017.01
8.0.160.0040.00716.84
8.0.150.0000.00716.85
8.0.140.0000.00716.77
8.0.130.0060.00013.39
8.0.120.0000.00816.95
8.0.110.0050.00216.82
8.0.100.0050.00316.88
8.0.90.0040.00416.91
8.0.80.0130.01016.98
8.0.70.0040.00416.96
8.0.60.0070.00016.83
8.0.50.0000.00716.79
8.0.30.0070.01117.29
8.0.20.0110.00717.40
8.0.10.0020.00516.88
8.0.00.0170.00316.91
7.4.330.0000.00515.55
7.4.320.0000.00616.52
7.4.300.0030.00316.68
7.4.290.0000.00716.53
7.4.280.0040.00416.58
7.4.270.0030.00316.58
7.4.260.0030.00716.61
7.4.250.0030.00516.59
7.4.240.0040.00416.55
7.4.230.0000.00716.45
7.4.220.0090.00916.57
7.4.210.0060.00816.59
7.4.200.0000.00716.61
7.4.160.0100.00816.61
7.4.150.0080.00817.40
7.4.140.0120.00617.86
7.4.130.0110.00616.46
7.4.120.0110.00716.52
7.3.330.0020.00213.36
7.3.320.0060.00013.38
7.3.310.0000.00716.25
7.3.300.0070.00016.45
7.3.290.0040.00416.38
7.3.280.0100.00716.34
7.3.270.0130.00417.40
7.3.260.0100.00616.39
7.3.250.0110.00916.35
7.3.240.0070.01316.45

preferences:
40.97 ms | 400 KiB | 5 Q