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.0100.00718.18
8.3.50.0070.01016.26
8.3.40.0000.01518.98
8.3.30.0110.01118.88
8.3.20.0050.00221.86
8.3.10.0080.00021.95
8.3.00.0080.00019.68
8.2.180.0120.00318.53
8.2.170.0110.00422.96
8.2.160.0120.00920.52
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00720.61
8.2.110.0090.00022.11
8.2.100.0040.00817.72
8.2.90.0040.00417.84
8.2.80.0050.00318.09
8.2.70.0030.00518.04
8.2.60.0000.01017.63
8.2.50.0080.00018.10
8.2.40.0050.00220.30
8.2.30.0040.00421.02
8.2.20.0040.00418.14
8.2.10.0040.00417.94
8.2.00.0000.00718.01
8.1.280.0090.00625.92
8.1.270.0050.00322.24
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00723.92
8.1.230.0090.00320.88
8.1.220.0070.00317.79
8.1.210.0080.00018.98
8.1.200.0050.00317.23
8.1.190.0030.00617.23
8.1.180.0050.00318.10
8.1.170.0030.00618.56
8.1.160.0050.00218.87
8.1.150.0030.00320.23
8.1.140.0050.00317.62
8.1.130.0050.00319.00
8.1.120.0030.00617.43
8.1.110.0050.00317.41
8.1.100.0050.00317.34
8.1.90.0040.00417.48
8.1.80.0020.00517.41
8.1.70.0050.00317.43
8.1.60.0040.00417.58
8.1.50.0040.00417.39
8.1.40.0000.00717.61
8.1.30.0000.01017.63
8.1.20.0030.00617.51
8.1.10.0030.00517.62
8.1.00.0030.00517.54
8.0.300.0000.00720.08
8.0.290.0000.00916.75
8.0.280.0030.00318.32
8.0.270.0000.00717.22
8.0.260.0030.00316.85
8.0.250.0070.00016.90
8.0.240.0040.00416.93
8.0.230.0090.00017.00
8.0.220.0070.00016.86
8.0.210.0000.00716.89
8.0.200.0030.00317.00
8.0.190.0000.00716.98
8.0.180.0000.00816.88
8.0.170.0030.00516.81
8.0.160.0040.00416.97
8.0.150.0040.00416.93
8.0.140.0000.00716.94
8.0.130.0060.00013.39
8.0.120.0000.00916.79
8.0.110.0040.00416.94
8.0.100.0040.00416.89
8.0.90.0070.00016.70
8.0.80.0110.00316.84
8.0.70.0030.00516.78
8.0.60.0040.00416.80
8.0.50.0030.00516.81
8.0.30.0090.01016.95
8.0.20.0090.01117.40
8.0.10.0000.00716.96
8.0.00.0150.00316.75
7.4.330.0000.00515.55
7.4.320.0030.00316.58
7.4.300.0030.00316.58
7.4.290.0000.00716.63
7.4.280.0070.00016.54
7.4.270.0040.00416.53
7.4.260.0000.00716.62
7.4.250.0030.00316.60
7.4.240.0080.00016.41
7.4.230.0000.00716.61
7.4.220.0040.00416.52
7.4.210.0000.02116.62
7.4.200.0030.00316.73
7.4.160.0100.00616.67
7.4.150.0070.01417.40
7.4.140.0110.00717.86
7.4.130.0060.01216.48
7.4.120.0090.01116.55
7.4.110.0120.00416.58
7.4.100.0030.02216.38
7.4.90.0070.01116.60
7.4.80.0090.00919.39
7.4.70.0000.01816.66
7.4.60.0040.01216.36
7.4.50.0030.00716.42
7.4.40.0130.00316.38
7.4.10.0110.00815.07
7.4.00.0070.00815.00
7.3.330.0060.00013.16
7.3.320.0060.00013.21
7.3.310.0070.00016.43
7.3.300.0070.00016.24
7.3.290.0080.01216.25
7.3.280.0070.01016.36
7.3.270.0110.01117.40
7.3.260.0120.00916.46
7.3.240.0120.00516.45
7.3.230.0090.00916.24
7.3.210.0090.00916.43
7.3.200.0100.00716.28
7.3.190.0060.00916.38
7.3.180.0100.00716.38
7.3.170.0130.01016.43
7.3.160.0030.01416.28
7.3.130.0030.01314.98
7.3.120.0040.01414.85
7.3.110.0090.00914.70
7.3.100.0080.00814.77
7.3.90.0080.00414.75
7.3.80.0140.00314.73
7.3.70.0100.00614.66
7.3.60.0130.00314.53
7.3.50.0000.01014.97
7.3.40.0100.00314.85
7.3.30.0080.00314.89
7.3.20.0090.00316.39
7.3.10.0080.00416.77
7.3.00.0060.00916.56
7.2.330.0110.00716.51
7.2.320.0060.01216.47
7.2.310.0130.00516.26
7.2.300.0160.00816.76
7.2.290.0070.01116.58
7.2.260.0100.00715.18
7.2.250.0090.00915.05
7.2.240.0000.01514.78
7.2.230.0070.01015.21
7.2.220.0030.01414.82
7.2.210.0030.01415.20
7.2.200.0040.01114.83
7.2.190.0000.01614.94
7.2.180.0030.01014.88
7.2.170.0060.00914.86
7.2.160.0090.00314.84
7.2.150.0060.00316.78
7.2.140.0030.00716.59
7.2.130.0070.01116.81
7.2.120.0000.01116.78
7.2.110.0090.00616.64
7.2.100.0110.00316.85
7.2.90.0140.00016.73
7.2.80.0040.00816.76
7.2.70.0030.00716.84
7.2.60.0070.00816.64
7.2.50.0060.00616.68
7.2.40.0100.00016.52
7.2.30.0000.01816.88
7.2.20.0060.01017.28
7.2.10.0100.01317.04
7.2.00.0050.01217.30
7.1.330.0070.00715.52
7.1.320.0030.01515.71
7.1.310.0030.01015.57
7.1.300.0030.01015.70
7.1.290.0030.01015.37
7.1.280.0040.00415.79
7.1.270.0070.00715.57
7.1.260.0090.00615.36
7.1.250.0040.01415.76
7.1.240.0030.00915.43
7.1.230.0030.01015.79
7.1.220.0100.00315.57
7.1.210.0070.00715.43
7.1.200.0040.00615.61
7.1.190.0030.01315.66
7.1.180.0060.00615.43
7.1.170.0000.00915.79
7.1.160.0100.00615.76
7.1.150.0120.00615.66
7.1.140.0060.00916.13
7.1.130.0110.00916.13
7.1.120.0100.00616.08
7.1.110.0110.00915.86
7.1.100.0050.00915.71
7.1.90.0060.01015.82
7.1.80.0100.01015.89
7.1.70.0110.01015.42
7.1.60.0140.01424.19
7.1.50.0200.01224.10
7.1.40.0140.01323.94
7.1.30.0200.00624.03
7.1.20.0870.01324.09
7.1.10.0100.00715.14
7.1.00.0060.01015.04
7.0.330.0030.00915.11
7.0.320.0080.00415.21
7.0.310.0060.00915.35
7.0.300.0030.00615.14
7.0.290.0030.01015.30
7.0.280.0060.00915.09
7.0.270.0040.00815.13
7.0.260.0000.01515.30
7.0.250.0040.01115.44
7.0.240.0040.01115.53
7.0.230.0060.00615.31
7.0.220.0070.00715.21
7.0.210.0040.01115.19
7.0.200.0040.00715.30
7.0.190.0030.00515.39
7.0.180.0060.00615.25
7.0.170.0030.00615.44
7.0.160.0040.00815.44
7.0.150.0050.00315.24
7.0.140.0030.00915.38
7.0.130.0040.00414.92
7.0.120.0030.01015.33
7.0.110.0030.00515.23
7.0.100.0090.00015.47
7.0.90.0030.00515.09
7.0.80.0070.00415.02
7.0.70.0060.00315.17
7.0.60.0060.00315.27
7.0.50.0030.00715.16
7.0.40.0090.00313.51
7.0.30.0070.00713.39
7.0.20.0050.00513.48
7.0.10.0040.01113.38
7.0.00.0040.01113.53
5.6.400.0070.00314.24
5.6.390.0070.01014.21
5.6.380.0070.00614.43
5.6.370.0030.00714.62
5.6.360.0070.00314.23
5.6.350.0090.00914.13
5.6.340.0040.00714.22
5.6.330.0070.00713.93
5.6.320.0060.00914.58
5.6.310.0030.00614.67
5.6.300.0040.00414.27
5.6.290.0040.00814.29
5.6.280.0090.00314.21
5.6.270.0030.01013.92
5.6.260.0100.00314.06
5.6.250.0090.00014.60
5.6.240.0070.00714.50
5.6.230.0060.00614.15
5.6.220.0030.00714.50
5.6.210.0090.00314.17
5.6.200.0000.01614.21
5.6.190.0030.00614.27
5.6.180.0000.01014.45
5.6.170.0060.00613.99
5.6.160.0100.00714.20
5.6.150.0000.01314.25
5.6.140.0100.00314.21
5.6.130.0030.01013.95
5.6.120.0060.00914.19
5.6.110.0100.00314.20
5.6.100.0090.00614.27
5.6.90.0070.00714.15
5.6.80.0030.00714.33
5.6.70.0030.01014.23
5.6.60.0000.01414.29
5.6.50.0060.00914.20
5.6.40.0060.00914.00
5.6.30.0070.00714.26
5.6.20.0100.00314.04
5.6.10.0080.00014.03
5.6.00.0060.00914.20

preferences:
35.6 ms | 400 KiB | 5 Q