3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $score_url = 'http://vowgag.com/to/23335/'; $headers = get_headers($score_url); $response = substr($headers[0], 9, 3); $html = file_get_contents($score_url); $html2 = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); $classname = 'entry-content'; $ogtitle = 'og:title'; $dom = new DOMDocument; $dom->loadHTML($html2); $xpath = new DOMXPath($dom); //$results = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]"); $results2 = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]/img[1]/@src"); $results3 = $xpath->query("//meta[@property='" . $ogtitle . "']/@content"); foreach ($results2 as $parseimg){ $parseimgurl = parse_url($parseimg->nodue.""); } echo $parseimgurl;
Output for 5.2.6 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.2.8
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 5.0.4 - 5.2.5
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: Connection refused in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: Connection refused in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 5.0.3
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: Connection refused in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: Connection refused in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 5.0.1 - 5.0.2
Warning: get_headers(): php_network_getaddresses: gethostbyname failed in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: Resource temporarily unavailable in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: gethostbyname failed in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: Resource temporarily unavailable in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 5.0.0
Warning: get_headers(): php_network_getaddresses: gethostbyname failed in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: Bad file descriptor in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: gethostbyname failed in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: Bad file descriptor in /in/8fv51 on line 6 Warning: DOMDocument::loadHTML(): Empty string supplied as input in /in/8fv51 on line 11 Notice: Undefined variable: parseimgurl in /in/8fv51 on line 20
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: get_headers() in /in/8fv51 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: get_headers() in /in/8fv51 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: get_headers() in /in/8fv51 on line 4