3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://www.eurobytes.nl/tutorials/league-of-legends-under-ubuntu' function getPlus1($url) { $html = file_get_contents( "https://plusone.google.com/_/+1/fastbutton?url=".urlencode($url)); $doc = new DOMDocument(); $doc->loadHTML($html); $counter=$doc->getElementById('aggregateCount'); return $counter->nodeValue; } function getTweets($url){ $json = file_get_contents( "http://urls.api.twitter.com/1/urls/count.json?url=".$url ); $ajsn = json_decode($json, true); $cont = $ajsn['count']; return $cont; } function getPins($url){ $json = file_get_contents( "http://api.pinterest.com/v1/urls/count.json?callback=receiveCount&url=".$url ); $json = substr( $json, 13, -1); $ajsn = json_decode($json, true); $cont = $ajsn['count']; return $cont; } function getFacebooks($url) { $xml = file_get_contents("http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($url)); $xml = simplexml_load_string($xml); $shares = $xml->link_stat->share_count; $likes = $xml->link_stat->like_count; $comments = $xml->link_stat->comment_count; return $likes + $shares + $comments; } ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/fG1LL on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FUNCTION in /in/fG1LL on line 4
Process exited with code 255.

preferences:
192.79 ms | 1395 KiB | 63 Q