3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDomain() { return 'example.com'; } function getSubDomains() { return array('www.example.com'); } function register($domainKeys, $subdomains) { $domains = (array) getDomain(); if ($subdomains == null) { $domains = array_merge($domains, getSubdomains()); } else { $domains = array_merge($domains, $subdomains); } return $domains; } var_dump(register(null, (array)$nonset);

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)
7.0.10.0000.05320.06
7.0.00.0030.04020.33
5.6.160.0170.07320.47
5.6.150.0070.07718.15
5.6.140.0070.08318.21
5.6.130.0030.04718.29
5.6.120.0030.05321.04
5.6.110.0170.07321.12
5.6.100.0070.07021.11
5.6.90.0100.08321.13
5.6.80.0030.09020.53
5.5.300.0030.05718.05
5.5.290.0100.08318.05
5.5.280.0100.08320.90
5.5.270.0030.08020.96
5.5.260.0070.05020.76
5.5.250.0000.04320.56
5.5.240.0170.07320.16

preferences:
141.86 ms | 1394 KiB | 7 Q