3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeException extends Exception { } 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); } $san = implode(",", array_map(function ($dns) { return "DNS:" . $dns; }, $domains)); throw new SomeException("yo"); return $domains; } function register2($domainKeys, $subdomains) { try { register($domainKeys, $subdomains); } catch(Exception $e) { trow new Exception($e->getMessage(), $e->getCode(), $e); } } var_dump(register2(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.0030.07020.09
7.0.00.0230.07020.15
5.6.160.0030.06020.48
5.6.150.0100.08018.34
5.6.140.0070.08018.27
5.6.130.0070.04018.18
5.6.120.0170.04721.04
5.6.110.0100.04721.13
5.6.100.0130.06021.14
5.6.90.0030.09321.00
5.6.80.0130.08320.50
5.5.300.0070.08017.97
5.5.290.0030.08018.01
5.5.280.0200.06020.89
5.5.270.0070.08320.86
5.5.260.0000.04720.90
5.5.250.0070.03720.63
5.5.240.0100.07020.28

preferences:
144.88 ms | 1394 KiB | 7 Q