3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://secure.i-web.ch/dweb/uri/de/behoerdenmain/gerichtetop/rechtsprechung/?action=info&pubid=4762'; $site = getSiteContent($url); // echo $site; $linksArr = getDomLinks($site); displayArray($linksArr); exit; function getSiteContent($url, $cookieFile = NULL) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0'); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); $data = curl_exec($ch); curl_close($ch); return $data; } function getDomLinks($contents) { $linkArr = array(); $dom = new domDocument; @$dom->loadHTML($contents); $links = $dom->getElementsByTagName('a'); foreach ($links as $tag) { $linkArr[$tag->getAttribute('href')] = $tag->childNodes->item(0)->nodeValue; } return $linkArr; } function displayArray($aArray) { if (is_array($aArray) && (count($aArray) > 0)) { print("<table border=1>"); print("<tr><th>Key</th><th>Value</th></tr>"); foreach ($aArray as $aKey => $aValue) { print("<tr>"); if (!is_array($aValue)) { if (empty($aValue)) { print("<td>$aKey</td><td><i>$aValue</i></td>"); } else { print("<td>$aKey</td><td>$aValue</td>"); } } else { print("<td>$aKey(array)</td><td>"); displayArray($aValue); print("</td>"); } print("</tr>"); } print("</table>"); } else { print("<i>empty or invalid</i>"); } } ?>

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.0130.00316.63
8.3.50.0050.01522.84
8.3.40.0090.00918.75
8.3.30.0100.00719.09
8.3.20.0080.00020.13
8.3.10.0000.00823.52
8.3.00.0030.00619.51
8.2.180.0070.01418.29
8.2.170.0080.00822.96
8.2.160.0040.01220.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00021.03
8.2.110.0060.00320.43
8.2.100.0090.00318.22
8.2.90.0050.00219.23
8.2.80.0030.00517.97
8.2.70.0080.00017.38
8.2.60.0050.00317.68
8.2.50.0040.00718.07
8.2.40.0050.00318.16
8.2.30.0000.00818.01
8.2.20.0080.00017.76
8.2.10.0000.00818.10
8.2.00.0030.00517.67
8.1.280.0100.00725.92
8.1.270.0000.00924.01
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00523.96
8.1.230.0060.00619.16
8.1.220.0080.00017.76
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.23
8.1.180.0090.00019.01
8.1.170.0060.00318.50
8.1.160.0040.00421.95
8.1.150.0070.00018.95
8.1.140.0000.00717.46
8.1.130.0000.00717.75
8.1.120.0040.00417.30
8.1.110.0040.00417.41
8.1.100.0040.00417.36
8.1.90.0030.00417.43
8.1.80.0000.00717.44
8.1.70.0030.00317.35
8.1.60.0000.00917.60
8.1.50.0050.00317.52
8.1.40.0040.00417.40
8.1.30.0030.00617.53
8.1.20.0050.00317.53
8.1.10.0040.00417.64
8.1.00.0000.00717.53
8.0.300.0050.00318.77
8.0.290.0070.00016.75
8.0.280.0070.00018.32
8.0.270.0050.00317.12
8.0.260.0050.00317.12
8.0.250.0030.00316.98
8.0.240.0000.00716.99
8.0.230.0000.00716.95
8.0.220.0020.00516.73
8.0.210.0000.00716.79
8.0.200.0070.00016.80
8.0.190.0070.00016.85
8.0.180.0030.00616.89
8.0.170.0040.00416.83
8.0.160.0020.00516.78
8.0.150.0060.00316.81
8.0.140.0000.00716.84
8.0.130.0020.00613.36
8.0.120.0040.00416.77
8.0.110.0030.00516.86
8.0.100.0070.00016.91
8.0.90.0040.00316.70
8.0.80.0170.00316.78
8.0.70.0040.00416.85
8.0.60.0000.00716.80
8.0.50.0000.00716.85
8.0.30.0090.01017.01
8.0.20.0180.00117.40
8.0.10.0000.00816.96
8.0.00.0080.00916.69
7.4.330.0050.00015.09
7.4.320.0030.00316.56
7.4.300.0030.00316.45
7.4.290.0000.00716.49
7.4.280.0080.00316.64
7.4.270.0060.00316.58
7.4.260.0000.01116.34
7.4.250.0000.00816.42
7.4.240.0020.00516.44
7.4.230.0070.00016.36
7.4.220.0070.01116.62
7.4.210.0020.01316.49
7.4.200.0000.00716.34
7.4.160.0190.00616.68
7.4.150.0090.00917.40
7.4.140.0070.01017.86
7.4.130.0100.00716.48
7.4.120.0080.01316.43
7.4.110.0130.00316.39
7.4.100.0110.01116.67
7.4.90.0100.00716.56
7.4.80.0140.00719.39
7.4.70.0040.01216.50
7.4.60.0100.00716.41
7.4.50.0050.00316.25
7.4.40.0090.00816.25
7.4.30.0060.00916.55
7.4.00.0070.01015.16
7.3.330.0000.00513.33
7.3.320.0030.00313.14
7.3.310.0040.00416.31
7.3.300.0000.00716.25
7.3.290.0000.01416.34
7.3.280.0050.01316.29
7.3.270.0100.01517.40
7.3.260.0060.01516.57
7.3.250.0090.00816.44
7.3.240.0140.00316.49
7.3.230.0060.01216.39
7.3.210.0060.01216.30
7.3.200.0040.01219.39
7.3.190.0120.00616.28
7.3.180.0130.00316.51
7.3.170.0060.00916.34
7.3.160.0000.01416.46
7.3.10.0040.01116.71
7.3.00.0000.01416.40
7.2.330.0060.01216.52
7.2.320.0060.01216.27
7.2.310.0060.01216.34
7.2.300.0090.01216.53
7.2.290.0060.00916.34
7.2.130.0000.01516.49
7.2.120.0100.00316.85
7.2.110.0040.01216.61
7.2.100.0000.01116.68
7.2.90.0060.00916.79
7.2.80.0120.00416.68
7.2.70.0030.00716.73
7.2.60.0030.01316.79
7.2.50.0110.00316.90
7.2.40.0040.00716.77
7.2.30.0040.01516.74
7.2.20.0090.00616.72
7.2.10.0080.00316.89
7.2.00.0030.01216.88
7.1.250.0070.01015.41
7.1.200.0030.00915.71
7.1.70.0040.01117.02
7.1.60.0100.01419.46
7.1.50.0060.01316.89
7.1.00.0070.07322.46
7.0.200.0030.00716.31
7.0.140.0030.07322.08
7.0.60.0030.04320.09
7.0.50.0070.07718.02
7.0.40.0000.06720.04
7.0.30.0430.06720.10
7.0.20.0230.05320.22
7.0.10.0030.07720.09
7.0.00.0000.04720.09
5.6.280.0130.06321.11
5.6.210.0170.06720.54
5.6.200.0000.04318.29
5.6.190.0070.04320.33
5.6.180.0300.07720.46
5.6.170.0370.07020.55
5.6.160.0170.07320.58
5.6.150.0100.07718.22
5.6.140.0070.08018.18
5.6.130.0070.06718.21
5.6.120.0170.07321.04
5.6.110.0070.08321.03
5.6.100.0100.07721.01
5.6.90.0070.07720.96
5.6.80.0030.05020.43
5.6.70.4600.04020.52
5.5.350.0170.08320.51
5.5.340.0100.05717.96
5.5.330.0000.04320.27
5.5.320.0000.04320.28
5.5.310.0400.08020.35
5.5.300.0130.06718.04
5.5.290.0030.05318.04
5.5.280.0070.06721.00
5.5.270.0130.04320.74
5.5.260.0070.07020.74
5.5.250.0070.08320.71
5.5.240.0130.03320.27
5.4.450.0170.05019.47
5.4.440.0470.04019.52
5.4.430.0100.04019.54
5.4.420.0230.03719.51
5.4.410.0430.04319.42
5.4.400.0300.04319.13
5.4.390.0200.04319.16
5.4.380.0200.06318.80
5.4.370.0170.05718.48
5.4.360.0330.06018.74
5.4.350.0230.05718.59
5.4.340.0200.06018.84
5.4.320.0080.03412.52
5.4.310.0060.03712.52
5.4.300.0040.04312.52
5.4.290.0060.04112.52
5.4.280.0070.04112.41
5.4.270.0050.03812.41
5.4.260.0050.03912.41
5.4.250.0090.03612.41
5.4.240.0060.03812.41
5.4.230.0050.04012.40
5.4.220.0060.03912.41
5.4.210.0050.03612.41
5.4.200.0090.03812.40
5.4.190.0050.04112.40
5.4.180.0090.03612.39
5.4.170.0040.03712.41
5.4.160.0090.04412.41
5.4.150.0050.04012.40
5.4.140.0050.05312.08
5.4.130.0070.03512.07
5.4.120.0090.03312.03
5.4.110.0060.03812.02
5.4.100.0060.03512.02
5.4.90.0070.03512.02
5.4.80.0070.03512.02
5.4.70.0060.03512.02
5.4.60.0080.04412.02
5.4.50.0050.03712.02
5.4.40.0060.04312.01
5.4.30.0080.03312.00
5.4.20.0070.03612.01
5.4.10.0040.03712.00
5.4.00.0050.03611.50
5.3.290.0080.04212.80
5.3.280.0090.03812.70
5.3.270.0070.04012.72
5.3.260.0080.03812.72
5.3.250.0100.03412.72
5.3.240.0070.03612.72
5.3.230.0080.03612.71
5.3.220.0080.03912.68
5.3.210.0080.04312.68
5.3.200.0070.04112.68
5.3.190.0040.04012.68
5.3.180.0140.04212.67
5.3.170.0080.05012.66
5.3.160.0110.03412.67
5.3.150.0070.04612.67
5.3.140.0090.03512.66
5.3.130.0050.04112.66
5.3.120.0100.04812.66
5.3.110.0090.05212.66
5.3.100.0090.04812.15
5.3.90.0080.04112.12
5.3.80.0070.04212.11
5.3.70.0060.04212.11
5.3.60.0070.03512.10
5.3.50.0070.04012.05
5.3.40.0050.04212.05
5.3.30.0080.03512.00
5.3.20.0050.03911.79
5.3.10.0120.04411.75
5.3.00.0100.03411.73
5.2.170.0070.0289.25
5.2.160.0050.0309.25
5.2.150.0070.0299.25
5.2.140.0030.0339.25
5.2.130.0050.0309.21
5.2.120.0080.0259.21
5.2.110.0040.0309.21
5.2.100.0060.0279.20
5.2.90.0090.0279.20
5.2.80.0050.0309.20
5.2.70.0040.0409.20
5.2.60.0080.0399.16
5.2.50.0080.0299.13
5.2.40.0060.0289.11
5.2.30.0020.0329.07
5.2.20.0040.0309.07
5.2.10.0030.0318.97
5.2.00.0040.0308.83
5.1.60.0040.0258.12
5.1.50.0030.0258.12
5.1.40.0050.0238.10
5.1.30.0020.0288.44
5.1.20.0050.0278.47
5.1.10.0040.0288.20
5.1.00.0050.0288.20
5.0.50.0030.0216.68
5.0.40.0050.0186.55
5.0.30.0020.0336.36
5.0.20.0050.0176.32
5.0.10.0080.0196.30
5.0.00.0030.0326.29
4.4.90.0030.0154.78
4.4.80.0010.0174.76
4.4.70.0040.0174.75
4.4.60.0050.0154.76
4.4.50.0030.0154.77
4.4.40.0040.0334.71
4.4.30.0010.0224.76
4.4.20.0040.0164.84
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0030.0174.67
4.3.100.0040.0154.66
4.3.90.0030.0174.64
4.3.80.0060.0294.58
4.3.70.0050.0174.63
4.3.60.0030.0184.63
4.3.50.0030.0234.63
4.3.40.0030.0324.54
4.3.30.0020.0183.33
4.3.20.0030.0153.30
4.3.10.0030.0203.26
4.3.00.0200.01018.23

preferences:
40.22 ms | 401 KiB | 5 Q