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);

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.0060.00916.63
8.3.50.0120.00316.47
8.3.40.0070.00718.85
8.3.30.0090.00618.76
8.3.20.0080.00020.30
8.3.10.0080.00023.52
8.3.00.0080.00022.07
8.2.180.0170.00016.88
8.2.170.0110.00422.96
8.2.160.0040.01119.04
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00719.27
8.2.120.0040.00426.35
8.2.110.0030.00622.11
8.2.100.0040.00717.78
8.2.90.0050.00319.17
8.2.80.0000.00818.16
8.2.70.0030.00617.75
8.2.60.0090.00018.05
8.2.50.0060.00318.10
8.2.40.0000.00820.42
8.2.30.0030.00521.10
8.2.20.0030.00618.13
8.2.10.0000.00718.15
8.2.00.0040.00418.14
8.1.280.0110.00325.92
8.1.270.0000.00722.09
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.91
8.1.230.0110.00019.16
8.1.220.0080.00017.78
8.1.210.0060.00318.77
8.1.200.0030.00717.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0030.00618.50
8.1.160.0040.00419.10
8.1.150.0020.00518.96
8.1.140.0040.00419.64
8.1.130.0040.00418.82
8.1.120.0030.00317.53
8.1.110.0080.00017.37
8.1.100.0000.00817.49
8.1.90.0040.00417.48
8.1.80.0050.00317.52
8.1.70.0000.00817.50
8.1.60.0050.00317.60
8.1.50.0040.00417.54
8.1.40.0030.00517.43
8.1.30.0040.00417.57
8.1.20.0040.00417.61
8.1.10.0090.00017.56
8.1.00.0000.00817.54
8.0.300.0080.00020.02
8.0.290.0030.00616.75
8.0.280.0080.00018.47
8.0.270.0000.00717.21
8.0.260.0030.00318.32
8.0.250.0030.00316.96
8.0.240.0050.00316.99
8.0.230.0040.00417.00
8.0.220.0040.00416.91
8.0.210.0050.00216.89
8.0.200.0040.00417.00
8.0.190.0090.00016.98
8.0.180.0070.00016.98
8.0.170.0030.00416.84
8.0.160.0050.00516.87
8.0.150.0000.00816.86
8.0.140.0000.00716.88
8.0.130.0000.00613.35
8.0.120.0040.00416.87
8.0.110.0000.00716.85
8.0.100.0030.00616.94
8.0.90.0030.00617.04
8.0.80.0150.00716.91
8.0.70.0040.00416.91
8.0.60.0040.00416.97
8.0.50.0020.00516.90
8.0.30.0100.00916.94
8.0.20.0110.00817.40
8.0.10.0000.00717.03
8.0.00.0110.00616.87
7.4.330.0000.00615.55
7.4.320.0040.00416.45
7.4.300.0000.00616.52
7.4.290.0050.00316.45
7.4.280.0060.00316.62
7.4.270.0000.00816.54
7.4.260.0000.00816.61
7.4.250.0090.00016.57
7.4.240.0040.00416.59
7.4.230.0030.00316.70
7.4.220.0160.01016.63
7.4.210.0080.00716.64
7.4.200.0070.00016.61
7.4.160.0090.00816.60
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0150.00316.54
7.4.120.0130.01016.54
7.3.330.0050.00013.35
7.3.320.0060.00013.20
7.3.310.0070.00016.40
7.3.300.0030.00316.38
7.3.290.0070.00016.26
7.3.280.0060.01016.34
7.3.270.0070.01317.40
7.3.260.0150.00516.43
7.3.250.0070.01016.49
7.3.240.0140.00516.40

preferences:
41.9 ms | 401 KiB | 5 Q