3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Set your own configuration options as you see fit. $feed = 'http://rss.nytimes.com/services/xml/rss/nyt/InternationalHome.xml'; $success = $feed->init(); // Make sure the page is being served with the right headers. $feed->handle_content_type(); // Set our paging values $start = (isset($_GET['start']) && !empty($_GET['start'])) ? $_GET['start'] : 0; // Where do we start? $length = (isset($_GET['length']) && !empty($_GET['length'])) ? $_GET['length'] : 5; // How many per page? $max = $feed->get_item_quantity(); // Where do we end? // When we end our PHP block, we want to make sure our DOCTYPE is on the top line to make // sure that the browser snaps into Standards Mode. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <title>SimplePie: Demo</title> <link rel="stylesheet" href="styles.css" type="text/css" media="screen, projector" /> </head> <body> <div id="site"> <?php // If we have an error, display it. if ($feed->error()) { echo '<div class="sp_errors">' . "\r\n"; echo '<p>' . htmlspecialchars($feed->error()) . "</p>\r\n"; echo '</div>' . "\r\n"; } ?> <?php if ($success): ?> <?php // get_items() will accept values from above. foreach($feed->get_items($start, $length) as $item): $feed = $item->get_feed(); ?> <div class="chunk"> <h4><?php if ($item->get_permalink()) echo '<a href="' . $item->get_permalink() . '">'; echo $item->get_title(true); if ($item->get_permalink()) echo '</a>'; ?></h4> <?php echo $item->get_content(); ?> <p class="footnote">Source: <a href="<?php echo $feed->get_permalink(); ?>"><?php echo $feed->get_title(); ?></a> | <?php echo $item->get_date('j M Y, g:i a'); ?></p> </div> <?php endforeach; ?> <?php endif; ?> <?php // Let's do our paging controls $next = (int) $start + (int) $length; $prev = (int) $start - (int) $length; // Create the NEXT link $nextlink = '<a href="?start=' . $next . '&length=' . $length . '">Next &raquo;</a>'; if ($next > $max) { $nextlink = 'Next &raquo;'; } // Create the PREVIOUS link $prevlink = '<a href="?start=' . $prev . '&length=' . $length . '">&laquo; Previous</a>'; if ($prev < 0 && (int) $start > 0) { $prevlink = '<a href="?start=0&length=' . $length . '">&laquo; Previous</a>'; } else if ($prev < 0) { $prevlink = '&laquo; Previous'; } // Normalize the numbering for humans $begin = (int) $start + 1; $end = ($next > $max) ? $max : $next; ?> <p>Showing <?php echo $begin; ?>&ndash;<?php echo $end; ?> out of <?php echo $max; ?> | <?php echo $prevlink; ?> | <?php echo $nextlink; ?> | <a href="<?php echo '?start=' . $start . '&length=5'; ?>">5</a>, <a href="<?php echo '?start=' . $start . '&length=10'; ?>">10</a>, or <a href="<?php echo '?start=' . $start . '&length=20'; ?>">20</a> at a time.</p> </div> </body> </html>

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.01016.61
8.3.50.0260.00821.15
8.3.40.0090.00618.58
8.3.30.0110.01118.64
8.3.20.0090.00620.37
8.3.10.0080.00023.60
8.3.00.0060.00319.68
8.2.180.0090.00616.75
8.2.170.0040.01122.96
8.2.160.0040.01120.43
8.2.150.0090.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0060.00322.05
8.2.100.0090.00317.66
8.2.90.0090.00019.09
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0000.00817.91
8.2.50.0080.00019.23
8.2.40.0040.00421.02
8.2.30.0000.00718.12
8.2.20.0000.00717.80
8.2.10.0070.00018.18
8.2.00.0030.00518.03
8.1.280.0070.01025.92
8.1.270.0090.00020.37
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.40
8.1.230.0030.00922.09
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0030.00518.50
8.1.160.0050.00222.11
8.1.150.0040.00418.92
8.1.140.0090.00017.37
8.1.130.0030.00317.70
8.1.120.0040.00417.45
8.1.110.0000.00817.45
8.1.100.0040.00417.39
8.1.90.0000.00717.37
8.1.80.0060.00317.43
8.1.70.0030.00317.45
8.1.60.0080.00517.52
8.1.50.0030.00517.55
8.1.40.0040.00717.44
8.1.30.0040.00417.69
8.1.20.0000.00817.77
8.1.10.0020.00517.53
8.1.00.0040.00417.50
8.0.300.0060.00318.77
8.0.290.0000.00816.88
8.0.280.0040.00418.50
8.0.270.0070.00017.13
8.0.260.0000.00617.16
8.0.250.0050.00317.01
8.0.240.0030.00316.98
8.0.230.0040.00417.05
8.0.220.0030.00316.86
8.0.210.0040.00416.90
8.0.200.0030.00316.97
8.0.190.0030.00517.05
8.0.180.0060.00616.97
8.0.170.0000.00816.88
8.0.160.0050.00316.87
8.0.150.0040.00416.96
8.0.140.0040.00416.89
8.0.130.0060.00013.40
8.0.120.0000.00816.91
8.0.110.0070.00016.91
8.0.100.0000.00716.78
8.0.90.0000.00716.85
8.0.80.0040.01116.96
8.0.70.0070.00016.86
8.0.60.0040.00416.80
8.0.50.0050.00317.02
8.0.30.0070.00917.37
8.0.20.0080.01117.40
8.0.10.0050.00217.14
8.0.00.0090.00916.70
7.4.330.0030.00315.08
7.4.320.0040.00416.57
7.4.300.0070.00016.57
7.4.290.0030.00816.66
7.4.280.0070.00016.61
7.4.270.0000.00716.59
7.4.260.0080.00316.46
7.4.250.0040.00416.52
7.4.240.0030.00316.62
7.4.230.0000.00816.76
7.4.220.0070.01016.67
7.4.210.0140.00316.61
7.4.200.0000.00716.75
7.4.160.0130.00316.49
7.4.150.0120.00617.40
7.4.140.0140.01017.86
7.4.130.0060.01416.49
7.4.120.0110.00616.61
7.4.110.0120.00616.78
7.4.100.0120.00716.44
7.4.90.0100.00716.41
7.4.80.0030.02219.39
7.4.70.0060.01516.70
7.4.60.0100.00616.46
7.4.50.0040.00416.43
7.4.40.0130.00916.32
7.4.30.0140.00416.65
7.4.10.0030.01314.86
7.4.00.0090.00715.05
7.3.330.0050.00013.12
7.3.320.0050.00013.16
7.3.310.0000.00716.27
7.3.300.0000.00716.30
7.3.290.0070.00716.31
7.3.280.0090.01016.31
7.3.270.0080.00817.40
7.3.260.0100.01416.61
7.3.250.0060.01216.62
7.3.240.0130.00316.35
7.3.230.0090.01016.39
7.3.210.0110.00816.24
7.3.200.0030.01216.60
7.3.190.0040.01216.31
7.3.180.0070.01016.52
7.3.170.0060.01116.27
7.3.160.0090.00916.35
7.3.130.0110.00414.96
7.3.120.0080.00614.75
7.3.110.0070.01014.88
7.3.100.0070.00614.73
7.3.90.0070.00714.68
7.3.80.0060.00714.93
7.3.70.0080.00514.75
7.3.60.0070.00814.66
7.3.50.0070.00514.72
7.3.40.0020.01314.81
7.3.30.0080.00814.84
7.3.20.0070.00916.43
7.3.10.0100.00216.54
7.3.00.0070.00916.50
7.2.330.0140.01116.64
7.2.320.0170.00816.51
7.2.310.0060.01016.47
7.2.300.0080.00816.51
7.2.290.0120.00616.46
7.2.260.0110.00714.66
7.2.250.0100.01015.00
7.2.240.0060.00814.91
7.2.230.0050.01214.78
7.2.220.0020.01415.05
7.2.210.0050.01114.92
7.2.200.0070.01014.88
7.2.190.0090.00614.89
7.2.180.0030.01215.03
7.2.170.0030.01414.94
7.2.160.0060.00914.90
7.2.150.0040.00816.63
7.2.140.0020.01116.79
7.2.130.0090.00716.63
7.2.120.0050.01216.69
7.2.110.0000.01416.68
7.2.100.0090.00616.83
7.2.90.0050.00816.78
7.2.80.0040.01116.76
7.2.70.0070.00916.78
7.2.60.0070.00816.68
7.2.50.0040.01316.69
7.2.40.0030.01216.50
7.2.30.0060.00816.50
7.2.20.0060.00916.81
7.2.10.0050.01216.66
7.2.00.0040.00917.60
7.1.330.0080.00815.41
7.1.320.0070.00515.49
7.1.310.0060.00415.43
7.1.300.0050.00715.47
7.1.290.0060.00815.62
7.1.280.0070.00615.64
7.1.270.0050.00615.61
7.1.260.0110.00215.60
7.1.250.0070.00715.62
7.1.240.0040.01415.68
7.1.230.0120.00015.66
7.1.220.0030.01315.64
7.1.210.0120.00315.57
7.1.200.0050.00615.50
7.1.190.0030.01015.56
7.1.180.0000.01715.54
7.1.170.0100.00315.70
7.1.160.0030.01015.52
7.1.150.0000.01215.64
7.1.140.0060.00615.48
7.1.130.0110.00415.30
7.1.120.0060.00915.49
7.1.110.0030.00615.57
7.1.100.0040.00716.87
7.1.90.0030.01315.61
7.1.80.0040.00415.57
7.1.70.0050.00316.23
7.1.60.0090.00517.29
7.1.50.0130.01125.07
7.1.40.0090.00615.67
7.1.30.0030.01415.32
7.1.20.0030.01015.72
7.1.10.0090.00615.58
7.1.00.0050.04218.97
7.0.330.0090.00915.43
7.0.320.0140.00015.32
7.0.310.0060.00614.91
7.0.300.0060.00915.22
7.0.290.0060.00615.28
7.0.280.0030.01315.49
7.0.270.0040.00815.14
7.0.260.0000.01015.24
7.0.250.0070.00415.38
7.0.240.0100.00015.34
7.0.230.0090.00015.05
7.0.220.0040.00815.34
7.0.210.0030.00614.87
7.0.200.0070.00516.00
7.0.190.0130.00015.30
7.0.180.0040.00915.19
7.0.170.0060.00915.28
7.0.160.0040.01115.39
7.0.150.0080.00415.18
7.0.140.0030.00615.33
7.0.130.0040.00715.27
7.0.120.0070.00715.20
7.0.110.0060.03018.47
7.0.100.0050.04018.45
7.0.90.0060.04518.45
7.0.80.0070.04518.49
7.0.70.0120.02718.47
7.0.60.0030.04618.56
7.0.50.0100.03818.50
7.0.40.0090.04016.51
7.0.30.0040.03916.56
7.0.20.0130.03516.63
7.0.10.0050.02716.45
7.0.00.0030.04316.58
5.6.400.0030.00614.31
5.6.390.0070.01114.34
5.6.380.0130.00314.23
5.6.370.0060.00814.18
5.6.360.0030.01314.33
5.6.350.0000.01314.28
5.6.340.0080.00014.01
5.6.330.0100.00314.19
5.6.320.0040.00714.09
5.6.310.0040.01114.48
5.6.300.0090.00314.41
5.6.290.0060.01014.59
5.6.280.0070.03217.57
5.6.270.0100.00014.43
5.6.260.0070.04217.57
5.6.250.0050.04417.42
5.6.240.0050.04517.52
5.6.230.0060.03017.38
5.6.220.0070.04517.40
5.6.210.0120.03317.27
5.6.200.0070.04517.45
5.6.190.0060.04317.43
5.6.180.0090.04017.43
5.6.170.0080.02617.38
5.6.160.0130.02517.38
5.6.150.0080.04517.48
5.6.140.0000.03517.42
5.6.130.0050.04517.46
5.6.120.0070.03917.44
5.6.110.0100.04417.46
5.6.100.0060.04117.32
5.6.90.0070.05017.34
5.6.80.0070.02717.13
5.6.70.0030.04316.92
5.6.60.0050.04117.02
5.6.50.0050.03617.03
5.6.40.0050.02717.04
5.6.30.0060.02817.00
5.6.20.0050.04016.84
5.6.10.0060.03817.21
5.6.00.0070.03917.05
5.5.380.0030.03015.80
5.5.370.0070.04215.99
5.5.360.0030.04815.82
5.5.350.0090.02315.90
5.5.340.0040.04515.94
5.5.330.0030.02816.10
5.5.320.0070.04316.11
5.5.310.0030.04516.28
5.5.300.0080.04316.03
5.5.290.0020.04216.13
5.5.280.0050.04616.24
5.5.270.0130.03815.97
5.5.260.0070.04516.22
5.5.250.0100.03715.97
5.5.240.0110.03615.75
5.5.230.0020.04215.69
5.5.220.0090.02515.55
5.5.210.0070.03815.79
5.5.200.0070.04415.55
5.5.190.0080.02515.69
5.5.180.0080.04015.85
5.5.170.0110.00313.84
5.5.160.0080.02515.78
5.5.150.0050.04215.62
5.5.140.0030.03515.77
5.5.130.0060.04415.88
5.5.120.0020.02815.63
5.5.110.0030.02515.75
5.5.100.0040.02515.47
5.5.90.0030.02915.72
5.5.80.0070.03915.61
5.5.70.0100.02015.77
5.5.60.0050.04215.73
5.5.50.0030.02615.63
5.5.40.0080.03615.73
5.5.30.0060.03015.75
5.5.20.0080.04115.55
5.5.10.0010.03315.59
5.5.00.0080.04115.49
5.4.450.0050.03815.12
5.4.440.0050.04415.14
5.4.430.0100.02815.04
5.4.420.0030.02715.14
5.4.410.0050.04114.97
5.4.400.0070.04014.91
5.4.390.0030.04414.94
5.4.380.0080.04214.95
5.4.370.0080.04014.86
5.4.360.0030.03114.94
5.4.350.0040.02514.86
5.4.340.0070.02214.97
5.4.330.0040.00810.66
5.4.320.0070.04014.85
5.4.310.0100.03614.92
5.4.300.0050.02414.92
5.4.290.0080.03715.00
5.4.280.0070.03714.91
5.4.270.0070.03914.93
5.4.260.0030.02314.93
5.4.250.0050.03915.02
5.4.240.0060.04414.91
5.4.230.0070.03814.88
5.4.220.0070.04214.94
5.4.210.0070.02314.91
5.4.200.0030.04415.01
5.4.190.0050.04014.99
5.4.180.0070.04215.09
5.4.170.0030.03614.73
5.4.160.0110.02414.95
5.4.150.0060.04014.96
5.4.140.0070.03613.64
5.4.130.0050.03913.63
5.4.120.0090.03713.52
5.4.110.0050.04013.65
5.4.100.0060.03813.38
5.4.90.0050.03713.67
5.4.80.0050.03813.62
5.4.70.0060.03813.54
5.4.60.0060.03813.48
5.4.50.0020.03813.49
5.4.40.0040.03913.64
5.4.30.0040.03113.53
5.4.20.0070.03813.61
5.4.10.0080.03313.66
5.4.00.0060.03513.38

preferences:
66.58 ms | 401 KiB | 5 Q