3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // 並列通信用マルチハンドルを用意 $mh = curl_multi_init(); // 通信先ごとにCurl Handleを作り、それを $mh にaddしていく $ch_news = curl_init("http://dailynews.yahoo.co.jp/fc/entertainment/rss.xml"); curl_setopt($ch_news, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_news); // 同様に $ch_music = curl_init("http://magazine.music.yahoo.co.jp/rss/ALL/rss.xml"); curl_setopt($ch_music, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_music); // 同様に $ch_trend = curl_init("http://searchranking.yahoo.co.jp/rss/trend-rss.xml"); curl_setopt($ch_trend, CURLOPT_RETURNTRANSFER, TRUE); curl_multi_add_handle($mh, $ch_trend); // せーので複数の通信を同時実行。whileで全て返ってくるのを待ちます do { curl_multi_exec($mh, $running); } while ( $running ); // 個々のXMLは、それぞれのCurl Handleを指定することで取得できる $rss_news = curl_multi_getcontent($ch_news); $rss_music = curl_multi_getcontent($ch_music); $rss_trend = curl_multi_getcontent($ch_trend); // 後始末 curl_multi_remove_handle($mh, $ch_news); curl_close($ch_news); curl_multi_remove_handle($mh, $ch_music); curl_close($ch_music); curl_multi_remove_handle($mh, $ch_trend); curl_close($ch_trend); curl_multi_close($mh);
based on TiNW7

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0070.00716.53
7.2.00.0060.00619.30
7.1.200.0040.00415.58
7.1.100.0000.01417.80
7.1.70.0060.00616.83
7.1.60.0120.01219.13
7.1.50.0060.01916.54
7.1.00.0030.07722.44
7.0.200.0000.00716.70
7.0.60.0100.06019.94
7.0.50.0070.08317.92
7.0.40.0070.08720.14
7.0.30.0570.06720.18
7.0.20.0170.04720.18
7.0.10.0000.08320.14
7.0.00.0030.08720.16
5.6.280.0030.03320.79
5.6.210.0130.07320.68
5.6.200.0030.04318.18
5.6.190.0070.08020.57
5.6.180.0100.08020.60
5.6.170.0100.05020.38
5.6.160.0070.05320.59
5.6.150.0030.08718.09
5.6.140.0030.05018.12
5.6.130.0070.08718.22
5.6.120.0070.05021.04
5.6.110.0170.04321.13
5.6.100.0030.04021.11
5.6.90.0100.08720.98
5.6.80.0100.08020.39
5.6.70.4200.03320.37
5.5.350.0200.04320.34
5.5.340.0070.08017.89
5.5.330.0130.06720.25
5.5.320.0300.05320.07
5.5.310.0230.06720.12
5.5.300.0100.04717.94
5.5.290.0030.08317.92
5.5.280.0200.07320.89
5.5.270.0070.07320.68
5.5.260.0100.08020.65
5.5.250.0100.07320.58
5.5.240.0100.04320.29
5.4.450.0200.06719.46
5.4.440.0200.06019.35
5.4.430.0300.07719.35
5.4.420.0330.07019.49
5.4.410.0270.04719.24
5.4.400.0370.05719.17
5.4.390.0270.05019.16
5.4.380.0170.07319.14
5.4.370.0300.06318.96
5.4.360.0200.07719.07
5.4.350.0470.03019.17
5.4.340.0200.06019.09
5.4.320.0270.05019.25
5.4.310.0330.04319.21
5.4.300.0170.05319.02
5.4.290.0200.05718.96
5.4.280.0300.06719.25
5.4.270.0370.04318.73
5.4.260.0130.07718.86
5.4.250.0230.05719.08
5.4.240.0230.05318.73
5.4.230.0200.05718.91
5.4.220.0300.05718.75
5.4.210.0300.04318.73
5.4.200.0200.05319.02
5.4.190.0300.04319.09
5.4.180.0170.05319.01
5.4.170.0230.05319.26
5.4.160.0270.05018.95
5.4.150.0300.04719.28
5.4.140.0270.06716.29
5.4.130.0270.04016.45
5.4.120.0230.04716.22
5.4.110.0330.04016.19
5.4.100.0170.05716.37
5.4.90.0130.06016.43
5.4.80.0170.05016.52
5.4.70.0330.06316.21
5.4.60.0300.05716.36
5.4.50.0030.04016.45
5.4.40.0300.05716.36
5.4.30.0170.04716.39
5.4.20.0030.05716.36
5.3.290.0830.05014.65
5.3.280.1270.04014.70
5.3.270.1130.05014.56
5.3.260.2730.05014.55
5.3.250.2430.04014.48
5.3.240.1700.03714.57
5.3.230.1730.03714.56
5.3.220.1930.03714.53
5.3.210.1800.04014.43
5.3.200.2470.04314.42
5.3.190.2230.04314.48
5.3.180.1930.04714.56