3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<ENDXML <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>Cricinfo Live Scores</title> <ttl>2</ttl> <link>http://www.cricinfo.com</link> <description>Latest scores from Cricinfo</description> <copyright>(c)Cricinfo</copyright> <language>en-gb</language> <pubDate>Fri, 23 Feb 2018 04:07:02 +0000</pubDate> <item> <title>Boland 25/3 * v KwaZulu-Natal 264/10 </title> <link>http://www.cricinfo.com/ci/engine/match/1123494.html?CMP=OTC-RSS </link> <description>Boland 25/3 * v KwaZulu-Natal 264/10 </description> <guid>http://www.cricinfo.com/ci/engine/match/1123494.html</guid> </item> <item> <title>North West 205/10 v Easterns 123/3 *</title> <link>http://www.cricinfo.com/ci/engine/match/1123495.html?CMP=OTC-RSS </link> <description>North West 205/10 v Easterns 123/3 *</description> <guid>http://www.cricinfo.com/ci/engine/match/1123495.html</guid> </item> <item> <title>Eastern Province 306/6 * v Gauteng</title> <link>http://www.cricinfo.com/ci/engine/match/1123496.html?CMP=OTC-RSS </link> <description>Eastern Province 306/6 * v Gauteng</description> <guid>http://www.cricinfo.com/ci/engine/match/1123496.html</guid> </item> <item> <title>Namibia v Free State 354/8 *</title> <link>http://www.cricinfo.com/ci/engine/match/1123498.html?CMP=OTC-RSS </link> <description>Namibia v Free State 354/8 *</description> <guid>http://www.cricinfo.com/ci/engine/match/1123498.html</guid> </item> <item> <title>South Africa A 220/10 v Australia 87/3 *</title> <link>http://www.cricinfo.com/ci/engine/match/1075981.html?CMP=OTC-RSS </link> <description>South Africa A 220/10 v Australia 87/3 *</description> <guid>http://www.cricinfo.com/ci/engine/match/1075981.html</guid> </item> <item> <title>Guyana 231/10 * v Windward Islands 286/7 </title> <link>http://www.cricinfo.com/ci/engine/match/1134092.html?CMP=OTC-RSS </link> <description>Guyana 231/10 * v Windward Islands 286/7 </description> <guid>http://www.cricinfo.com/ci/engine/match/1134092.html</guid> </item> <item> <title>Karachi Kings v Quetta Gladiators</title> <link>http://www.cricinfo.com/ci/engine/match/1128819.html?CMP=OTC-RSS </link> <description>Karachi Kings v Quetta Gladiators</description> <guid>http://www.cricinfo.com/ci/engine/match/1128819.html</guid> </item> <item> <title>Multan Sultans v Lahore Qalandars</title> <link>http://www.cricinfo.com/ci/engine/match/1128820.html?CMP=OTC-RSS </link> <description>Multan Sultans v Lahore Qalandars</description> <guid>http://www.cricinfo.com/ci/engine/match/1128820.html</guid> </item> </channel> </rss> ENDXML; $rss->SimpleXML_Load_String($xml); $list = array(); $found = 0; foreach ($rss->getElementsByTagName('item') as $node) { $item = array( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue ); array_push($list, $item); } $numberofresults = 20; for ($i = 0; $i < $numberofresults; $i++) { $title = $list[$i]['title']; $titletolower = strtolower($title); $desc = $list[$i]['desc']; $desctolower = strtolower($desc); if (strpos($desctolower, "*") !== false) { $desc = 'Live'; } else { $desc = ' Not Live'; } echo $title . "\n"; echo $desc . "\n"; $found++; } if ($found == 0) { echo $list[$i]['title'][0]; } ?>

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.0110.00418.55
8.3.50.0030.01417.91
8.3.40.0120.00318.65
8.3.30.0070.00718.84
8.3.20.0060.00321.86
8.3.10.0040.00421.76
8.3.00.0090.00019.68
8.2.180.0140.00718.79
8.2.170.0150.00022.96
8.2.160.0140.00720.49
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0040.00420.52
8.2.120.0050.00226.35
8.2.110.0050.00520.41
8.2.100.0080.00317.91
8.2.90.0000.00917.59
8.2.80.0030.00518.03
8.2.70.0060.00317.93
8.2.60.0030.00617.63
8.2.50.0080.00018.10
8.2.40.0040.00420.61
8.2.30.0000.00820.82
8.2.20.0040.00418.01
8.2.10.0080.00017.96
8.2.00.0000.00718.00
8.1.280.0090.00625.92
8.1.270.0080.00021.93
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.97
8.1.230.0110.00022.74
8.1.220.0040.00417.79
8.1.210.0080.00018.90
8.1.200.0040.00417.23
8.1.190.0000.01017.13
8.1.180.0090.00018.10
8.1.170.0050.00318.49
8.1.160.0070.00018.85
8.1.150.0000.00822.11
8.1.140.0080.00017.71
8.1.130.0000.00719.03
8.1.120.0030.00717.39
8.1.110.0030.00517.32
8.1.100.0070.00017.45
8.1.90.0040.00417.50
8.1.80.0040.00417.39
8.1.70.0040.00417.44
8.1.60.0070.00017.55
8.1.50.0040.00417.45
8.1.40.0040.00417.50
8.1.30.0080.00017.56
8.1.20.0040.00417.57
8.1.10.0000.00717.63
8.1.00.0040.00417.49
8.0.300.0000.00719.95
8.0.290.0040.00416.75
8.0.280.0030.00318.41
8.0.270.0040.00417.21
8.0.260.0030.00316.76
8.0.250.0030.00316.90
8.0.240.0080.00016.96
8.0.230.0000.00916.96
8.0.220.0000.00716.92
8.0.210.0040.00416.84
8.0.200.0000.00816.87
8.0.190.0000.00717.03
8.0.180.0000.00816.98
8.0.170.0060.00316.96
8.0.160.0050.00316.82
8.0.150.0080.00316.91
8.0.140.0030.00316.96
8.0.130.0000.00613.41
8.0.120.0050.00316.96
8.0.110.0000.00716.78
8.0.100.0000.00816.89
8.0.90.0040.00416.83
8.0.80.0060.00916.85
8.0.70.0000.01016.98
8.0.60.0000.00716.79
8.0.50.0040.00416.91
8.0.30.0080.01117.11
8.0.20.0100.01117.41
8.0.10.0080.00016.92
8.0.00.0100.01016.84
7.4.330.0000.00615.55
7.4.320.0030.00316.39
7.4.300.0050.00316.64
7.4.290.0030.00316.52
7.4.280.0040.00416.62
7.4.270.0000.00716.47
7.4.260.0030.00316.64
7.4.250.0040.00416.48
7.4.240.0050.00216.53
7.4.230.0070.00016.42
7.4.220.0050.00316.64
7.4.210.0040.01116.59
7.4.200.0080.00016.70
7.4.160.0100.00716.54
7.4.150.0150.00417.40
7.4.140.0080.00917.86
7.4.130.0100.01016.40
7.4.120.0100.01016.43
7.4.110.0070.01016.53
7.4.100.0090.00916.41
7.4.90.0120.00616.50
7.4.80.0080.01519.39
7.4.70.0100.01016.69
7.4.60.0130.00316.35
7.4.50.0100.00716.52
7.4.40.0090.00916.50
7.4.00.0030.01314.95
7.3.330.0020.00213.00
7.3.320.0030.00313.13
7.3.310.0000.00716.14
7.3.300.0000.00616.25
7.3.290.0080.01016.28
7.3.280.0080.00916.23
7.3.270.0060.01217.40
7.3.260.0150.00716.34
7.3.240.0140.00516.46
7.3.230.0140.00716.53
7.3.210.0030.01416.50
7.3.200.0150.00616.34
7.3.190.0030.01316.13
7.3.180.0130.00316.21
7.3.170.0030.01916.31
7.3.160.0140.00316.30
7.2.330.0090.00916.28
7.2.320.0090.01216.70
7.2.310.0060.01016.42
7.2.300.0060.01316.61
7.2.290.0130.00416.53
7.2.110.0070.00716.33
7.2.60.0030.00916.81
7.2.20.0130.01317.90
7.2.10.0090.01417.37
7.2.00.0110.01717.86
7.1.200.0080.00315.59
7.1.140.0140.01416.60
7.1.130.0120.01516.49
7.1.120.0140.01416.79
7.1.110.0130.00915.92
7.1.100.0090.00915.89
7.1.90.0130.01316.02
7.1.80.0080.01116.11
7.1.70.0090.01315.34
7.1.60.0330.01633.12
7.1.50.0340.01632.80
7.1.40.0600.01532.32
7.1.30.0310.02032.59
7.1.20.0310.01632.39
7.1.10.0120.00914.50
7.1.00.0080.01014.73

preferences:
56.9 ms | 401 KiB | 5 Q