3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.3.0 - 8.3.14, 8.4.1
Warning: get_headers(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: Trying to access array offset on false in /in/8fv51 on line 5 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 6 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/8fv51 on line 7 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for 8.2.0 - 8.2.26
Warning: get_headers(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: Trying to access array offset on value of type bool in /in/8fv51 on line 5 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 6 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/8fv51 on line 7 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for 8.1.0 - 8.1.31
Warning: get_headers(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: Trying to access array offset on value of type bool in /in/8fv51 on line 5 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for vowgag.com 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 for vowgag.com failed: System error in /in/8fv51 on line 6 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for 8.0.13 - 8.0.30
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: Trying to access array offset on value of type bool in /in/8fv51 on line 5 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 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for 8.0.0 - 8.0.12
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Warning: Trying to access array offset on value of type bool in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 6 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for 7.4.0, 7.4.26 - 7.4.33
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 Notice: Trying to access array offset on value of type bool in /in/8fv51 on line 5 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 7.4.3 - 7.4.25
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Notice: Trying to access array offset on value of type bool in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution 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 7.3.32 - 7.3.33
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
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 4 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution 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.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12
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.5.35, 5.6.7 - 5.6.17, 5.6.20 - 5.6.28, 7.0.0 - 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.0.5, 5.1.0 - 5.1.6, 5.2.0 - 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.3.11, 4.4.0 - 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

preferences:
60.4 ms | 440 KiB | 5 Q