3v4l.org

run code in 300+ PHP versions simultaneously
<?php function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); curl_close($ch); return $data; } $html = file_get_contents_curl("https://translate.google.it"); //parsing begins here: $doc = new DOMDocument(); @$doc->loadHTML($html); $nodes = $doc->getElementsByTagName('title'); //get and display what you need: $title = $nodes->item(0)->nodeValue; $metas = $doc->getElementsByTagName('meta'); for ($i = 0; $i < $metas->length; $i++) { $meta = $metas->item($i); if($meta->getAttribute('name') == 'description') $description = $meta->getAttribute('content'); if($meta->getAttribute('name') == 'keywords') $keywords = $meta->getAttribute('content'); } echo "Title: $title". '<br/><br/>'; echo "Description: $description". '<br/><br/>'; echo "Keywords: $keywords";

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.0100.00716.88
8.3.50.0170.00316.46
8.3.40.0150.00618.56
8.3.30.0100.01018.84
8.3.20.0070.00320.27
8.3.10.0080.00023.52
8.3.00.0040.00419.79
8.2.180.0070.01116.75
8.2.170.0070.01022.96
8.2.160.0100.00320.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0030.00621.18
8.2.100.0000.01117.91
8.2.90.0060.00319.27
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0040.00419.30
8.2.30.0040.00418.05
8.2.20.0040.00417.74
8.2.10.0040.00418.00
8.2.00.0050.00318.02
8.1.280.0080.00825.92
8.1.270.0000.00820.55
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00723.95
8.1.230.0040.00822.75
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00717.23
8.1.190.0040.00417.10
8.1.180.0030.00518.10
8.1.170.0080.00018.52
8.1.160.0080.00022.02
8.1.150.0040.00418.73
8.1.140.0040.00417.30
8.1.130.0000.00717.50
8.1.120.0050.00317.28
8.1.110.0050.00217.37
8.1.100.0030.00317.29
8.1.90.0050.00317.37
8.1.80.0070.00017.41
8.1.70.0030.00317.31
8.1.60.0050.00317.47
8.1.50.0000.00817.38
8.1.40.0000.00817.48
8.1.30.0060.00317.47
8.1.20.0070.00017.51
8.1.10.0000.00817.59
8.1.00.0050.00217.35
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0000.00718.45
8.0.270.0040.00416.89
8.0.260.0070.00017.29
8.0.250.0000.00717.05
8.0.240.0070.00017.05
8.0.230.0050.00217.00
8.0.220.0040.00417.00
8.0.210.0000.00716.90
8.0.200.0000.00717.01
8.0.190.0040.00716.91
8.0.180.0040.00416.95
8.0.170.0000.00816.93
8.0.160.0000.00816.84
8.0.150.0040.00416.79
8.0.140.0040.00416.90
8.0.130.0050.00013.36
8.0.120.0000.00816.96
8.0.110.0000.00716.89
8.0.100.0070.00017.01
8.0.90.0070.00016.94
8.0.80.0070.00716.93
8.0.70.0000.00716.74
8.0.60.0000.00716.76
8.0.50.0000.00816.74
8.0.30.0100.00617.12
8.0.20.0120.00717.40
8.0.10.0040.00416.96
8.0.00.0130.01116.83
7.4.330.0030.00315.08
7.4.320.0030.00316.54
7.4.300.0070.00016.57
7.4.290.0070.00016.48
7.4.280.0000.00716.49
7.4.270.0070.00016.48
7.4.260.0030.00316.55
7.4.250.0080.00016.41
7.4.240.0060.00116.56
7.4.230.0000.00816.59
7.4.220.0090.01216.34
7.4.210.0130.00416.68
7.4.200.0000.00716.41
7.4.160.0120.00316.51
7.4.150.0070.01117.40
7.4.140.0090.01017.86
7.4.130.0120.00716.55
7.4.120.0110.00716.48
7.4.110.0140.00316.69
7.4.100.0120.00616.40
7.4.90.0090.00916.46
7.4.80.0120.01119.39
7.4.70.0190.00316.57
7.4.60.0090.00616.46
7.4.50.0060.00316.57
7.4.40.0100.01016.30
7.4.30.0170.00716.47
7.4.00.0000.01014.96
7.3.330.0080.00013.36
7.3.320.0000.00513.18
7.3.310.0030.00316.19
7.3.300.0030.00316.39
7.3.290.0090.00616.36
7.3.280.0100.00916.35
7.3.270.0030.01317.40
7.3.260.0110.00716.48
7.3.250.0070.01216.52
7.3.240.0030.01316.34
7.3.230.0070.01416.39
7.3.210.0080.00816.36
7.3.200.0120.00916.28
7.3.190.0110.00816.43
7.3.180.0180.00016.46
7.3.170.0110.00616.40
7.3.160.0150.00616.24
7.2.330.0090.00916.27
7.2.320.0150.00616.65
7.2.310.0170.00316.48
7.2.300.0110.00616.30
7.2.290.0080.01116.52
7.2.60.0080.00816.82
7.2.00.0030.00919.27
7.1.200.0040.00415.63
7.1.100.0060.00817.61
7.1.70.0030.00316.80
7.1.60.0100.01320.03
7.1.50.0100.01316.77
7.1.00.0030.07022.58
7.0.200.0320.00414.46
7.0.60.0070.08720.03
7.0.50.0100.04317.86
7.0.40.0070.04720.30
7.0.30.0230.03720.30
7.0.20.0270.06320.23
7.0.10.0130.04020.17
7.0.00.0030.04720.16
5.6.280.0000.05721.11
5.6.210.0100.08020.68
5.6.200.0000.07718.23
5.6.190.0130.08020.78
5.6.180.3270.04720.55
5.6.170.0200.04320.46
5.6.160.0000.05320.48
5.6.150.0030.08718.18
5.6.140.0100.07018.19
5.6.130.0030.04018.18
5.6.120.0070.08021.16
5.6.110.0070.08321.15
5.6.100.0100.04721.14
5.6.90.0070.07021.04
5.6.80.0130.07320.44
5.6.70.4100.03320.38
5.5.350.0230.07720.42
5.5.340.0100.08018.04
5.5.330.0100.08020.42
5.5.320.0270.03720.24
5.5.310.0270.06320.27
5.5.300.0100.08018.09
5.5.290.0070.03718.08
5.5.280.0030.04320.96
5.5.270.0100.08020.66
5.5.260.0030.08320.81
5.5.250.0130.07020.67
5.5.240.0100.08320.08
5.4.450.0230.07019.33
5.4.440.0330.06319.57
5.4.430.0330.06019.63
5.4.420.0200.06019.57
5.4.410.0170.05719.46
5.4.400.0270.05319.16
5.4.390.0300.04719.26
5.4.380.0230.07719.05
5.4.370.0270.05018.97
5.4.360.0270.05719.21
5.4.350.0170.05318.84
5.4.340.0300.04319.12
5.4.320.0200.05019.27
5.4.310.0270.04019.13
5.4.300.0230.05319.11
5.4.290.0300.05019.04
5.4.280.0230.06019.25
5.4.270.0170.05719.35
5.4.260.0170.05019.23
5.4.250.0030.06718.97
5.4.240.0230.04719.26
5.4.230.0200.06718.88
5.4.220.0130.05719.04
5.4.210.0370.06319.25
5.4.200.0170.06019.35
5.4.190.0230.05718.82
5.4.180.0130.05719.10
5.4.170.0100.06719.11
5.4.160.0270.04719.21
5.4.150.0300.04018.81
5.4.140.0130.05316.45
5.4.130.0170.05016.33
5.4.120.0170.05016.44
5.4.110.0230.06016.20
5.4.100.0270.04016.59
5.4.90.0270.04316.51
5.4.80.0270.07016.27
5.4.70.0030.03716.29
5.4.60.0100.07016.57
5.4.50.0070.07016.48
5.4.40.0270.07016.43
5.4.30.0300.05016.47
5.4.20.0400.05716.24

preferences:
39.95 ms | 400 KiB | 5 Q