3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getDomainProp($domain){ if ($_BLOB_CACHE === null){ $tmp = file('tmp/cache.txt'); $_BLOB_CACHE = foreach ($tmp as $l){ $l = trim($l); $arr = explode(';', $l); $_BLOB_CACHE[array_shift($arr)] = $arr; } } if (isset($_BLOB_CACHE[$domain])) return $_BLOB_CACHE[$domain]; $postdata = 'raw_whois=on&getCI=on&getPR=on&getWeblog=on&getAlexa=on&getLI=on&getYAI=on&getGI=on&getYAHOOBacks=on&isYACA=on&isDMOZ=on&domain=' . $domain; $opts = array('http' => array( 'method' => 'POST', 'header' => explode("\n", 'Connection: keep-alive Accept: text/javascript, text/html, application/xml, text/xml, */* Origin: http://web24.ru X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1624.2 Safari/537.36 Content-type: application/x-www-form-urlencoded; charset=UTF-8 Referer: http://web24.ru/tools/domain/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8'), 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('http://web24.ru/dn.php?js=1', false, $context); $res = array(); preg_match_all('/CY\: (\d+)/', $result, $match); print_r($match); print_r($result); return false; }
Output for 5.4.0 - 5.5.3
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/jBuGi on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_FOREACH in /in/jBuGi on line 6
Process exited with code 255.