3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* GET リクエストでのシンプルなAPI */ //URLを指定 $url = "http://www.php.net/"; $res = file_get_contents("http://api.b.st-hatena.com/entry.count?url=".$url); var_dump($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); ?> <?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.70.0130.00617.13
8.3.60.0060.01518.68
8.3.50.0090.01121.21
8.3.40.0000.01519.12
8.3.30.0080.00819.27
8.3.20.0090.00018.98
8.3.10.0030.00519.63
8.3.00.0060.00324.04
8.2.180.0090.00919.04
8.2.170.0190.00322.96
8.2.160.0100.00320.47
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00321.22
8.2.110.0050.00521.24
8.2.100.0030.00718.28
8.2.90.0090.00019.45
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00518.18
8.2.50.0080.00018.10
8.2.40.0000.00818.53
8.2.30.0080.00020.10
8.2.20.0000.00917.93
8.2.10.0030.00517.96
8.2.00.0060.00318.05
8.1.280.0120.00925.92
8.1.270.0000.00823.99
8.1.260.0040.01126.35
8.1.250.0000.00828.09
8.1.240.0030.00624.09
8.1.230.0060.00819.18
8.1.220.0040.00418.01
8.1.210.0040.00418.77
8.1.200.0060.00317.61
8.1.190.0000.00917.60
8.1.180.0050.00318.10
8.1.170.0030.00618.80
8.1.160.0040.00419.07
8.1.150.0050.00318.87
8.1.140.0000.00817.57
8.1.130.0030.00318.12
8.1.120.0040.00417.54
8.1.110.0050.00317.56
8.1.100.0000.00817.58
8.1.90.0000.00817.67
8.1.80.0030.00417.63
8.1.70.0000.00717.46
8.1.60.0000.00817.59
8.1.50.0040.00417.61
8.1.40.0040.00417.75
8.1.30.0040.00417.84
8.1.20.0030.00617.88
8.1.10.0040.00417.77
8.1.00.0000.00817.70
8.0.300.0000.00718.77
8.0.290.0040.00417.13
8.0.280.0040.00418.75
8.0.270.0090.00017.55
8.0.260.0040.00417.19
8.0.250.0040.00417.13
8.0.240.0000.00917.12
8.0.230.0040.00417.32
8.0.220.0040.00417.17
8.0.210.0040.00417.28
8.0.200.0000.00717.25
8.0.190.0050.00217.29
8.0.180.0040.00417.12
8.0.170.0000.00917.27
8.0.160.0040.00417.20
8.0.150.0030.00616.97
8.0.140.0030.00617.15
8.0.130.0000.00613.74
8.0.120.0040.00417.21
8.0.110.0040.00417.30
8.0.100.0040.00417.18
8.0.90.0000.00817.13
8.0.80.0070.01717.25
8.0.70.0000.00817.16
8.0.60.0060.00317.29
8.0.50.0000.00817.27
8.0.30.0150.00617.48
8.0.20.0100.01017.40
8.0.10.0000.00917.25
8.0.00.0110.00817.13
7.4.330.0000.00514.95
7.4.320.0040.00416.66
7.4.300.0070.00016.73
7.4.290.0030.00316.79
7.4.280.0030.00316.68
7.4.270.0000.00716.82
7.4.260.0000.00613.58
7.4.250.0080.00016.76
7.4.240.0000.00716.88
7.4.230.0030.00316.59
7.4.220.0030.01616.88
7.4.210.0060.01116.76
7.4.200.0000.00716.96
7.4.190.0000.00817.02
7.4.160.0080.00816.96
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0100.00817.02
7.4.120.0090.00916.86
7.4.110.0070.01116.77
7.4.100.0180.00016.69
7.4.90.0130.01017.05
7.4.80.0120.00619.37
7.4.70.0030.01516.82
7.4.60.0180.00616.77
7.4.50.0070.00316.84
7.4.40.0140.00422.52
7.4.30.0000.01816.88
7.4.10.0030.01315.55
7.4.00.0050.01015.38
7.3.330.0000.00513.46
7.3.320.0070.00013.62
7.3.310.0050.00316.60
7.3.300.0000.00716.69
7.3.290.0090.00616.66
7.3.280.0090.00816.73
7.3.270.0070.01017.40
7.3.260.0120.01418.24
7.3.250.0090.00916.76
7.3.240.0200.00616.76
7.3.230.0180.00416.81
7.3.210.0190.00316.79
7.3.200.0100.00719.39
7.3.190.0090.00916.59
7.3.180.0060.01016.86
7.3.170.0060.01116.77
7.3.160.0130.00316.80
7.3.130.0000.01715.29
7.3.120.0070.00915.21
7.3.110.0060.01314.96
7.3.100.0130.00315.18
7.3.90.0070.00415.09
7.3.80.0040.00715.25
7.3.70.0000.00915.16
7.3.60.0000.01014.80
7.3.50.0040.01115.01
7.3.40.0060.00614.86
7.3.30.0040.01115.12
7.3.20.0060.00717.03
7.3.10.0030.00916.91
7.3.00.0070.00716.75
7.2.330.0110.00816.75
7.2.320.0190.00017.02
7.2.310.0070.01317.06
7.2.300.0060.01617.00
7.2.290.0090.00916.97
7.2.260.0130.00315.67
7.2.250.0080.00815.29
7.2.240.0090.00315.53
7.2.230.0070.00715.39
7.2.220.0030.01315.57
7.2.210.0090.00615.16
7.2.200.0070.00715.15
7.2.190.0080.00415.43
7.2.180.0120.00315.42
7.2.170.0030.01015.46
7.2.160.0100.00015.09
7.2.150.0030.00916.85
7.2.140.0110.00717.03
7.2.130.0110.00317.03
7.2.120.0030.00917.29
7.2.110.0060.00316.86
7.2.100.0060.00817.18
7.2.90.0030.00717.32
7.2.80.0060.00917.09
7.2.70.0060.00617.19
7.2.60.0050.00817.22
7.2.50.0070.00617.20
7.2.40.0070.00717.23
7.2.30.0040.00717.31
7.2.20.0070.01017.30
7.2.10.0030.01317.23
7.2.00.0060.00818.37
7.1.330.0070.00715.76
7.1.320.0030.00915.73
7.1.310.0000.01516.19
7.1.300.0000.01216.01
7.1.290.0070.01015.61
7.1.280.0060.00615.89
7.1.270.0090.00615.67
7.1.260.0100.00715.97
7.1.250.0080.00315.88
7.1.240.0030.01015.82
7.1.230.0060.00616.15
7.1.220.0070.00715.93
7.1.210.0030.01016.11
7.1.200.0090.00516.07
7.1.190.0080.00815.84
7.1.180.0030.00615.64
7.1.170.0040.00816.23
7.1.160.0100.00615.92
7.1.150.0060.00316.10
7.1.140.0080.00816.04
7.1.130.0030.01216.10
7.1.120.0080.00816.12
7.1.110.0060.01016.07
7.1.100.0070.01015.89
7.1.90.0070.00715.80
7.1.80.0030.00915.65
7.1.70.0080.00816.80
7.1.60.0130.00517.64
7.1.50.0050.01016.60
7.1.40.0040.00915.82
7.1.30.0060.00615.96
7.1.20.0050.00816.04
7.1.10.0030.01315.94
7.1.00.0030.03819.27
7.0.330.0110.00315.65
7.0.320.0030.01215.36
7.0.310.0030.01015.84
7.0.300.0000.01015.29
7.0.290.0120.00015.71
7.0.280.0060.01015.63
7.0.270.0110.00015.93
7.0.260.0030.00715.75
7.0.250.0060.00915.70
7.0.240.0030.01215.84
7.0.230.0030.01215.67
7.0.220.0060.00615.88
7.0.210.0120.00315.69
7.0.200.0020.01016.27
7.0.190.0060.00315.68
7.0.180.0040.00415.49
7.0.170.0110.00315.76
7.0.160.0030.00915.40
7.0.150.0030.00615.56
7.0.140.0000.04318.91
7.0.130.0090.00915.54
7.0.120.0030.01315.59
7.0.110.0060.00915.85
7.0.100.0070.00715.63
7.0.90.0000.01415.44
7.0.80.0030.00615.66
7.0.70.0500.04317.90
7.0.60.0420.04517.98
7.0.50.0080.04418.28
7.0.40.0100.03717.17
7.0.30.0020.05417.00
7.0.20.0110.04517.00
7.0.10.0020.04017.13
7.0.00.0140.04517.10
5.6.400.0070.01014.54
5.6.390.0040.01114.52
5.6.380.0060.00614.82
5.6.370.0030.01014.81
5.6.360.0090.00614.35
5.6.350.0100.00314.50
5.6.340.0050.00814.73
5.6.330.0000.01114.25
5.6.320.0130.00314.48
5.6.310.0000.01414.64
5.6.300.0070.00714.74
5.6.290.0030.00914.42
5.6.280.0040.03918.02
5.6.270.0040.01114.32
5.6.260.0140.00014.70
5.6.250.0030.01014.64
5.6.240.0030.01114.52
5.6.230.0040.00814.40
5.6.220.0100.03317.79
5.6.210.0070.04417.94
5.6.200.0090.02617.87
5.6.190.0070.04417.91
5.6.180.0090.03817.88
5.6.170.0130.04017.89
5.6.160.0010.05418.00
5.6.150.0020.03317.90
5.6.140.0070.04718.08
5.6.130.0060.04117.91
5.6.120.0030.05218.17
5.6.110.0090.04418.09
5.6.100.0080.05018.05
5.6.90.0130.04317.91
5.6.80.0070.02317.60
5.6.70.0140.02317.61
5.6.60.0050.03117.53
5.6.50.0070.04017.65
5.6.40.0050.03017.74
5.6.30.0050.04617.44
5.6.20.0060.03117.62
5.6.10.0030.04717.71
5.6.00.0120.04017.60
5.5.380.0000.01014.50
5.5.370.0030.00914.32
5.5.360.0060.04617.71
5.5.350.0120.04217.66
5.5.340.0080.04117.85
5.5.330.0070.04717.78
5.5.320.0070.03017.55
5.5.310.0120.03917.99
5.5.300.0020.04717.70
5.5.290.0070.04617.68
5.5.280.0080.03718.07
5.5.270.0060.04518.04
5.5.260.0100.04417.81
5.5.250.0080.04817.86
5.5.240.0110.04117.44
5.5.230.0070.03217.56
5.5.220.0080.04117.66
5.5.210.0110.04717.44
5.5.200.0080.04217.45
5.5.190.0070.03017.47
5.5.180.0050.02717.54
5.5.170.0160.00014.61
5.5.160.0150.01817.32
5.5.150.0110.03017.30
5.5.140.0050.02717.64
5.5.130.0080.02117.35
5.5.120.0070.02017.35
5.5.110.0040.02617.51
5.5.100.0050.02417.30
5.5.90.0050.02317.34
5.5.80.0050.03317.28
5.5.70.0060.02117.52
5.5.60.0050.03417.36
5.5.50.0060.02117.31
5.5.40.0090.02017.26
5.5.30.0020.02517.25
5.5.20.0040.02017.32
5.5.10.0090.02017.42
5.5.00.0070.02217.27
5.4.450.0070.04615.58
5.4.440.0050.03715.41
5.4.430.0020.04215.35
5.4.420.0030.04515.40
5.4.410.0020.03415.55
5.4.400.0030.03015.45
5.4.390.0100.03515.25
5.4.380.0060.04315.39
5.4.370.0070.04315.26
5.4.360.0080.04315.39
5.4.350.0060.03215.26
5.4.340.0030.04615.25
5.4.330.0070.00311.26
5.4.320.0020.04615.24
5.4.310.0130.03515.29
5.4.300.0070.02315.44
5.4.290.0050.02115.43
5.4.280.0020.02615.26
5.4.270.0030.02315.17
5.4.260.0080.01715.33
5.4.250.0050.02115.16
5.4.240.0060.02515.16
5.4.230.0020.02515.22
5.4.220.0050.02015.16
5.4.210.0040.02215.24
5.4.200.0070.01815.29
5.4.190.0030.02415.26
5.4.180.0050.03215.21
5.4.170.0030.02315.14
5.4.160.0060.02215.35
5.4.150.0000.02915.28
5.4.140.0010.01914.02
5.4.130.0080.01513.77
5.4.120.0080.01713.92
5.4.110.0060.01814.04
5.4.100.0070.02014.10
5.4.90.0030.02114.11
5.4.80.0000.03514.04
5.4.70.0070.01614.02
5.4.60.0030.02013.88
5.4.50.0050.02814.02
5.4.40.0050.01713.80
5.4.30.0070.01813.83
5.4.20.0050.03514.08
5.4.10.0020.02414.12
5.4.00.0050.01813.72
5.3.290.0090.04012.87
5.3.280.0070.02112.58
5.3.270.0000.02512.90
5.3.260.0050.02012.68
5.3.250.0040.02112.74
5.3.240.0030.02212.76
5.3.230.0100.01712.80
5.3.220.0030.02412.71
5.3.210.0080.02012.70
5.3.200.0040.02412.75
5.3.190.0020.02412.77
5.3.180.0020.02212.73
5.3.170.0030.01812.85
5.3.160.0050.03612.75
5.3.150.0050.02012.69
5.3.140.0040.02012.81
5.3.130.0030.01812.81
5.3.120.0030.02212.73
5.3.110.0020.02812.74
5.3.100.0030.04312.28
5.3.90.0070.02012.51
5.3.80.0020.01812.40
5.3.70.0000.02112.33
5.3.60.0050.02012.24
5.3.50.0020.02212.44
5.3.40.0040.02212.39
5.3.30.0050.02412.34
5.3.20.0030.02412.20
5.3.10.0020.02612.18
5.3.00.0030.02012.10
5.2.170.0070.02712.27
5.2.160.0000.02712.27
5.2.150.0000.02712.27
5.2.140.0030.02312.27
5.2.130.0030.03012.27
5.2.120.0030.02712.27
5.2.110.0000.03712.27
5.2.100.0070.02312.27
5.2.90.0000.03012.27
5.2.80.0070.02712.27
5.2.70.0030.06712.27
5.2.60.0000.03712.27
5.2.50.0030.04312.27
5.2.40.0030.03012.27
5.2.30.0100.05712.27
5.2.20.0070.06312.27
5.2.10.0100.06012.27
5.2.00.0000.06312.27
5.1.60.0030.05712.27
5.1.50.0100.04712.27
5.1.40.0070.05012.27
5.1.30.0070.04312.27
5.1.20.0070.04312.27
5.1.10.0030.04712.27
5.1.00.0070.05312.27
5.0.50.0070.04012.27
5.0.40.0000.04312.27
5.0.30.0100.06012.27
5.0.20.0030.02312.27
5.0.10.0030.04712.27
5.0.00.0070.04012.27
4.4.90.0000.02712.27
4.4.80.0030.02312.27
4.4.70.0030.02712.27
4.4.60.0030.03312.27
4.4.50.0070.02312.27
4.4.40.0000.05712.27
4.4.30.0070.02712.27
4.4.20.0030.03312.27
4.4.10.0030.03712.27
4.4.00.0030.05312.27
4.3.110.0030.02012.27
4.3.100.0030.02012.27
4.3.90.0030.02712.27
4.3.80.0000.02712.27
4.3.70.0030.01312.27
4.3.60.0070.03012.27
4.3.50.0070.02312.27
4.3.40.0000.05312.27
4.3.30.0030.02312.27
4.3.20.0030.03312.27
4.3.10.0000.04012.27
4.3.00.0030.03312.27

preferences:
42.83 ms | 401 KiB | 5 Q