3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* GET リクエストでのシンプルなAPI */ //URLを指定 $url = "http://phplab.jp/"; $res = file_get_contents("http://api.b.st-hatena.com/entry.count?url=".$url); var_dump($res); echo $res; ?> <?php /* 被ブックマーク合計数取得API */ $request = xmlrpc_encode_request("bookmark.getTotalCount", $url); $context = stream_context_create(array('http' => array( 'method' => "POST", 'header' => "Content-Type: text/xml", 'content' => $request ))); $file = file_get_contents("http://b.hatena.ne.jp/xmlrpc", false, $context); $response = xmlrpc_decode($file); var_dump($response); echo $response; ?> <?php /* 50件以降も取得する 規制回避 */ function get_HB_favorited_counts(array $urls) { $ret = array_fill_keys($urls, false); $base_url = 'http://api.b.st-hatena.com/entry.counts'; foreach (array_chunk($urls, 50) as $set) { $query = '?' .implode('&', array_map(function ($url) { return 'url=' . rawurlencode($url); }, $set)); $res = json_decode(@file_get_contents($base_url . $query), true); if (is_array($res)) { foreach ($res as $url => $count) { $ret[$url] = $count; } } } return $ret; } $urls = array('http://codecanyon.net/', 'http://www.htaccesseditor.com/', 'http://phplab.jp/', 'http://www.php.net/', 'http://nicovideo.jp/', 'http://google.com/', 'http://google.co.jp/', 'http://example.com/', 'http://www.php.gr.jp/', 'http://php-users.jp/', 'http://aws.amazon.com/jp/php/', 'http://www.ioncube.jp/', 'http://amazon.com/', 'http://amazon.co.jp/', 'http://ameblo.jp/', 'http://blog.livedoor.com/', 'http://jugem.jp/', 'http://blog.fc2.com/', 'http://blog.seesaa.jp/contents/about/?via=a8', 'http://d.hatena.ne.jp/', 'http://blog.so-net.ne.jp/', 'http://www.ninja.co.jp/blog/', 'http://plaza.rakuten.co.jp/', 'http://blog.goo.ne.jp/', 'http://www.fruitblog.net/', 'http://www.exblog.jp/', 'http://blog.oricon.co.jp/', 'http://blogs.yahoo.co.jp/', 'http://ja.wordpress.com/', 'http://webryblog.biglobe.ne.jp/', 'http://www.yaplog.jp/', 'http://www.anisen.tv/', 'http://gamecs.jp/', 'http://www.eniblo.com/', 'http://blog.kuruten.jp/', 'http://iralog.net/', 'http://h.hatena.ne.jp/', 'http://www.foodlog.jp/', 'http://www.b-shoku.jp/', 'http://d-nikki.com/', 'http://a-thera.com/', 'http://blog.emachi.co.jp/blog/', 'http://www.areablog.jp/', 'http://www.2chiiki.jp/', 'http://www.zige.jp/', 'http://blog.qlep.com/', 'http://blog.goyah.net/', 'http://blog.saitamania.net/', 'http://fblg.jp/', 'https://arekao.jp/index.php?module=Profile&action=ShowRegistForm', 'http://sl.lcomi.ne.jp/mrs/', 'http://blog.k-plaza.com/', 'http://www.actiblog.com/' ); foreach (get_HB_favorited_counts($urls) as $key=>$c){ echo $key.'==>'.$c.'<br/>'; } echo 'Array count==>'.count($urls); ?>

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.0070.00717.13
8.3.50.0120.00521.95
8.3.40.0000.01618.85
8.3.30.0090.00619.51
8.3.20.0080.00020.55
8.3.10.0030.00523.89
8.3.00.0060.00319.63
8.2.180.0070.01118.79
8.2.170.0120.00322.96
8.2.160.0110.00720.66
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00022.36
8.2.110.0070.00321.36
8.2.100.0090.00318.16
8.2.90.0060.00318.16
8.2.80.0040.00419.21
8.2.70.0030.00517.75
8.2.60.0050.00317.88
8.2.50.0040.00417.88
8.2.40.0040.00419.65
8.2.30.0030.00518.29
8.2.20.0070.00017.91
8.2.10.0050.00318.25
8.2.00.0060.00318.05
8.1.280.0040.01125.92
8.1.270.0050.00324.07
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0030.00621.22
8.1.230.0090.00317.96
8.1.220.0030.00517.91
8.1.210.0040.00418.77
8.1.200.0060.00317.50
8.1.190.0090.00017.73
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0040.00422.15
8.1.150.0040.00418.88
8.1.140.0040.00417.59
8.1.130.0030.00317.98
8.1.120.0000.00717.62
8.1.110.0030.00617.54
8.1.100.0000.00917.64
8.1.90.0060.00317.55
8.1.80.0000.00817.53
8.1.70.0000.00817.61
8.1.60.0000.00917.70
8.1.50.0040.00417.58
8.1.40.0090.00017.68
8.1.30.0080.00017.76
8.1.20.0040.00417.77
8.1.10.0040.00417.83
8.1.00.0040.00417.68
8.0.300.0000.00918.84
8.0.290.0080.00017.25
8.0.280.0000.00818.68
8.0.270.0080.00017.52
8.0.260.0030.00317.60
8.0.250.0070.00017.25
8.0.240.0000.00917.34
8.0.230.0000.00717.30
8.0.220.0000.00817.15
8.0.210.0050.00317.18
8.0.200.0030.00317.27
8.0.190.0000.00817.28
8.0.180.0030.00617.16
8.0.170.0060.00317.29
8.0.160.0040.00417.07
8.0.150.0040.00417.16
8.0.140.0040.00417.13
8.0.130.0000.00613.75
8.0.120.0060.00317.21
8.0.110.0000.00817.31
8.0.100.0050.00317.30
8.0.90.0050.00217.15
8.0.80.0080.01117.19
8.0.70.0060.00317.19
8.0.60.0000.00817.13
8.0.50.0040.00417.27
8.0.30.0090.01217.45
8.0.20.0130.00717.40
8.0.10.0030.00517.25
8.0.00.0080.01217.08
7.4.330.0050.00015.00
7.4.320.0030.00316.79
7.4.300.0030.00316.68
7.4.290.0030.00316.63
7.4.280.0030.00316.68
7.4.270.0070.00016.84
7.4.260.0070.00016.76
7.4.250.0040.00416.82
7.4.240.0030.00516.67
7.4.230.0050.00316.94
7.4.220.0130.00616.77
7.4.210.0070.01016.84
7.4.200.0000.00716.86
7.4.190.0040.00417.02
7.4.160.0170.00416.79
7.4.150.0090.01217.40
7.4.140.0090.01117.86
7.4.130.0100.00716.79
7.4.120.0130.00716.87
7.4.110.0090.00916.78
7.4.100.0060.01616.74
7.4.90.0120.00616.87
7.4.80.0070.01619.39
7.4.70.0100.00816.88
7.4.60.0060.01116.91
7.4.50.0000.00816.75
7.4.40.0080.00322.77
7.4.30.0030.01516.98
7.4.00.0080.00814.95
7.3.330.0030.00313.46
7.3.320.0000.00513.63
7.3.310.0050.00316.59
7.3.300.0070.00016.55
7.3.290.0080.00816.65
7.3.280.0140.00816.65
7.3.270.0180.00817.40
7.3.260.0130.00416.68
7.3.250.0140.00716.84
7.3.240.0110.01616.86
7.3.230.0140.00416.63
7.3.210.0040.01216.79
7.3.200.0150.00919.39
7.3.190.0140.00416.61
7.3.180.0140.00316.54
7.3.170.0170.00616.85
7.3.160.0070.01116.79
7.3.120.0090.00615.25
7.3.110.0070.01015.19
7.3.100.0080.00315.16
7.3.90.0090.00615.03
7.3.80.0030.00615.14
7.3.70.0040.00715.19
7.3.60.0100.00715.20
7.3.50.0040.01115.09
7.3.40.0120.00015.10
7.3.30.0030.01015.22
7.3.20.0170.00016.66
7.3.10.0140.00316.88
7.3.00.0070.01016.91
7.2.330.0100.01716.99
7.2.320.0090.00916.77
7.2.310.0110.00717.03
7.2.300.0100.00716.88
7.2.290.0120.00816.83
7.2.240.0030.01015.43
7.2.230.0170.00314.78
7.2.220.0030.00615.21
7.2.210.0100.00315.29
7.2.200.0070.00715.38
7.2.190.0000.01715.31
7.2.180.0100.00015.47
7.2.170.0040.00815.34
7.2.160.0030.01015.35
7.2.150.0150.00317.10
7.2.140.0120.00317.14
7.2.130.0070.01017.30
7.2.120.0070.01016.91
7.2.110.0060.01017.15
7.2.100.0070.01017.16
7.2.90.0100.00717.15
7.2.80.0080.00617.18
7.2.70.0100.00717.03
7.2.60.0060.00917.13
7.2.50.0070.01116.96
7.2.40.0000.01417.19
7.2.30.0070.01017.02
7.2.20.0060.01116.86
7.2.10.0070.00717.25
7.2.00.0020.01318.47
7.1.330.0090.00316.13
7.1.320.0000.01415.93
7.1.310.0090.00616.24
7.1.300.0030.01016.15
7.1.290.0030.01015.76
7.1.280.0110.00416.07
7.1.270.0110.00616.07
7.1.260.0070.00415.75
7.1.250.0070.01115.77
7.1.200.0090.00316.12
7.1.100.0000.01418.38
7.1.70.0080.00017.25
7.1.60.0070.02019.33
7.1.50.0090.01617.14
7.1.00.0070.07722.80
7.0.200.0520.00715.23
7.0.140.0070.07322.55
7.0.60.0100.06020.32
7.0.50.0070.08318.15
7.0.40.0030.09020.61
7.0.30.0330.06020.51
7.0.20.0300.07020.54
7.0.10.0030.05320.61
7.0.00.0070.07720.46
5.6.280.0100.07021.20
5.6.210.0070.08720.91
5.6.200.0070.06318.55
5.6.190.0100.08720.96
5.6.180.0230.08321.13
5.6.170.0300.06720.80
5.6.160.0100.08020.82
5.6.150.0070.08018.49
5.6.140.0130.05718.47
5.6.130.0000.04718.62
5.6.120.0100.06721.53
5.6.110.0030.04321.55
5.6.100.0070.08721.32
5.6.90.0100.05321.52
5.6.80.0070.08320.76
5.6.70.4130.03720.67
5.5.350.0030.05720.69
5.5.340.0170.07018.29
5.5.330.0100.06320.80
5.5.320.0370.07720.65
5.5.310.0070.05020.67
5.5.300.0100.07718.36
5.5.290.0070.08718.39
5.5.280.0070.08721.11
5.5.270.0200.05721.31
5.5.260.0070.08721.23
5.5.250.0070.08720.98
5.5.240.0370.06320.45
5.4.450.1130.06719.52
5.4.440.0170.07019.68
5.4.430.0700.06319.67
5.4.420.0670.00019.75
5.4.410.0130.07019.20
5.4.400.0170.06019.12
5.4.390.0270.06718.86
5.4.380.0200.06018.71
5.4.370.0230.04318.78
5.4.360.0330.03018.78
5.4.350.0050.03912.24
5.4.340.0080.03412.23
5.4.320.0080.04012.71
5.4.310.0080.03812.71
5.4.300.0080.05012.72
5.4.290.0070.03812.71
5.4.280.0060.03612.61
5.4.270.0050.03812.62
5.4.260.0070.03712.61
5.4.250.0060.03812.62
5.4.240.0070.03512.62
5.4.230.0060.03812.61
5.4.220.0060.03712.61
5.4.210.0040.03712.61
5.4.200.0080.04512.61
5.4.190.0110.04812.59
5.4.180.0190.04012.59
5.4.170.0160.04312.59
5.4.160.0140.04612.59
5.4.150.0140.04812.59
5.4.140.0170.04312.27
5.4.130.0410.08112.26
5.4.120.0150.04412.21
5.4.110.0120.04712.21
5.4.100.0100.05112.21
5.4.90.0180.04112.21
5.4.80.0190.04012.21
5.4.70.0290.03712.21
5.4.60.0130.04712.21
5.4.50.0120.04612.21
5.4.40.0180.04012.20
5.4.30.0170.04312.19
5.4.20.0180.03912.20
5.4.10.0230.03412.20
5.4.00.0150.04211.68
5.3.290.0040.04112.93
5.3.280.0070.04012.86
5.3.270.0210.04112.85
5.3.260.0180.04512.86
5.3.250.0180.04412.85
5.3.240.0190.04212.85
5.3.230.0220.04112.85
5.3.220.0150.04612.82
5.3.210.0230.03812.82
5.3.200.0150.05012.81
5.3.190.0110.05212.81
5.3.180.0570.07112.81
5.3.170.0170.04412.82
5.3.160.0170.04412.81
5.3.150.0110.05012.81
5.3.140.0180.04412.80
5.3.130.0180.04312.80
5.3.120.0200.04212.79
5.3.110.0170.04512.79
5.3.100.0200.04112.29
5.3.90.0120.04712.26
5.3.80.0130.04712.25
5.3.70.0190.04212.25
5.3.60.0160.04512.23
5.3.50.0190.04112.19
5.3.40.0140.04712.18
5.3.30.0220.03712.15
5.3.20.0190.04211.93
5.3.10.0150.04411.89
5.3.00.0160.04111.88
5.2.170.0140.0379.20
5.2.160.0150.0349.20
5.2.150.0100.0399.20
5.2.140.0170.0329.20
5.2.130.0280.0849.16
5.2.120.0110.0379.16
5.2.110.0290.0809.16
5.2.100.0140.0349.17
5.2.90.0140.0339.16
5.2.80.0130.0349.16
5.2.70.0140.0359.16
5.2.60.0120.0359.11
5.2.50.0120.0359.08
5.2.40.0110.0379.05
5.2.30.0130.0339.03
5.2.20.0160.0319.03
5.2.10.0140.0338.93
5.2.00.0110.0348.78
5.1.60.0060.0338.07
5.1.50.0140.0278.07
5.1.40.0150.0258.05
5.1.30.0050.0388.41
5.1.20.0170.0268.42
5.1.10.0120.0318.14
5.1.00.0100.0318.15
5.0.50.0090.0256.62
5.0.40.0060.0266.48
5.0.30.0070.0376.29
5.0.20.0090.0236.27
5.0.10.0100.0226.24
5.0.00.0090.0366.23
4.4.90.0040.0214.78
4.4.80.0090.0164.75
4.4.70.0060.0214.75
4.4.60.0100.0174.75
4.4.50.0600.0454.77
4.4.40.0080.0284.71
4.4.30.0080.0184.76
4.4.20.0070.0194.85
4.4.10.0100.0154.85
4.4.00.0050.0314.76
4.3.110.0090.0164.67
4.3.100.0060.0194.66
4.3.90.0070.0174.63
4.3.80.0110.0254.59
4.3.70.0070.0174.63
4.3.60.0110.0154.63
4.3.50.0070.0194.63
4.3.40.0060.0284.53
4.3.30.0050.0183.31
4.3.20.0040.0193.29
4.3.10.0040.0193.25
4.3.00.0200.0278.11

preferences:
46.94 ms | 401 KiB | 5 Q